PR c++/85553
[official-gcc.git] / gcc / testsuite / g++.dg / ext / has_nothrow_copy-2.C
blob901d2110748f74863cdfffec8fdc9d41f8e40ef2
1 // PR c++/36871
2 // { dg-do run }
3 #include <cassert>
5 struct A {
6   template <class T> A (T)
7 #if __cplusplus <= 201402L
8   throw(int)                    // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
9 #endif
10   ;
12 struct B {
13   B (B&) throw ();
14   template <class T> B (T)
15 #if __cplusplus <= 201402L
16   throw(int)                    // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
17 #endif
18   ;
21 int main ()
23   assert (__has_nothrow_copy (A));
24   assert (__has_nothrow_copy (B));