Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/variadic-new.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do run { target c++11 } } |
2 // Contributed by Peter Dimov | |
3 // PR c++/32597 | |
4 #include <assert.h> | |
5 #include <new> | |
6 | |
7 int k = 5; | |
8 | |
9 template< class... Args > void f( Args... args ) | |
10 { | |
11 new( &k ) int( args... ); | |
12 } | |
13 | |
14 int main() | |
15 { | |
16 f(); | |
17 assert( k == 0 ); | |
18 } |