Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/inh-ctor38.C

raw
1 // CWG 2799
2 // Test that inheriting a trivial default constructor produces a trivial
3 // default constructor.
4
5 // { dg-do compile { target c++11 } }
6
7 #include <type_traits>
8
9 struct A {
10 A() = default;
11 };
12
13 struct B : A
14 {
15 using A::A;
16 B(int);
17 };
18
19 static_assert (std::is_trivially_constructible<B>::value, "");