Debian Codegraph @

gcc/testsuite/g++.dg/ext/is_nothrow_constructible7.C

raw
1 // { dg-do compile { target c++11 } }
2 // PR c++/100470
3
4 struct S1{
5 S1(S1&&) noexcept(false);
6 };
7 struct S2{
8 S2(S2&&) noexcept(false) = default;
9 };
10 struct S3{
11 S3(S3&&) noexcept(false){}
12 };
13 struct S4{
14 S4(S4&&) = default;
15 };
16
17 static_assert(!__is_nothrow_constructible(S1, S1), "");
18 static_assert(!__is_nothrow_constructible(S2, S2), "");
19 static_assert(!__is_nothrow_constructible(S3, S3), "");
20 static_assert( __is_nothrow_constructible(S4, S4), "");