OSDN Git Service

PR c++/43856
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / variadic-new.C
1 // { dg-do "run" }
2 // { dg-options "-std=c++0x" }
3 // Contributed by Peter Dimov
4 // PR c++/32597
5 #include <assert.h>
6 #include <new>
7
8 int k = 5;
9
10 template< class... Args > void f( Args... args )
11 {
12    new( &k ) int( args... );
13 }
14
15 int main()
16 {
17    f();
18    assert( k == 0 );
19 }