Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / variadic-new.C
blob869052774cf37e4f0366bc4a47d2ba59fae17aff
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>
8 int k = 5;
10 template< class... Args > void f( Args... args )
12    new( &k ) int( args... );
15 int main()
17    f();
18    assert( k == 0 );