111
|
1 // PR c++/36871
|
|
2 // { dg-do run }
|
|
3 #include <cassert>
|
|
4
|
|
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 ;
|
|
11 };
|
|
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 ;
|
|
19 };
|
|
20
|
|
21 int main ()
|
|
22 {
|
|
23 assert (__has_nothrow_copy (A));
|
|
24 assert (__has_nothrow_copy (B));
|
|
25 }
|