diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C new file mode 100644 index 00000000000..5ac88d6b7db --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C @@ -0,0 +1,15 @@ +// { dg-options "-std=c++11" } + +extern "C" int printf (const char *, ...); +template< class T > +struct D : T { + using T::T; + // declares all constructors from class T + ~D() { printf ("Destroying wrapper\n"); } +}; + +struct A { + A(int); +}; + +D<A> d(42); |