Debian Codegraph @

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

raw
1 // PR c++/36872
2 // { dg-do run }
3 // { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
4 #include <cassert>
5
6 struct S {
7 S (const S&) throw ();
8 S (int)
9 #if __cplusplus <= 201402L
10 throw (int) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
11 #endif
12 ;
13 };
14
15 int main ()
16 {
17 assert (__has_nothrow_copy (S));
18 }