Debian Codegraph @

gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C

raw
1 // PR c++/56268
2 // { dg-do compile { target c++11 } }
3
4 template <class T>
5 struct A {
6 A(const A&) noexcept (T::value);
7 };
8
9 struct B {
10 static const bool value = true;
11 };
12
13 template <class T>
14 struct C {
15 static const bool value = __has_nothrow_copy (T);
16 };
17
18 #define SA(X) static_assert((X),#X)
19 SA(C<A<B>>::value);