gcc/testsuite/g++.dg/cpp1y/attr-deprecated-3.C
raw| 1 | // PR c++/93228 |
| 2 | // { dg-do compile { target c++14 } } |
| 3 | |
| 4 | template <typename T> |
| 5 | struct [[deprecated("foo")]] bar {}; // { dg-message "declared here" } |
| 6 | struct [[deprecated("baz")]] qux {}; // { dg-message "declared here" } |
| 7 | |
| 8 | void |
| 9 | quux () |
| 10 | { |
| 11 | bar<int> b; // { dg-warning "is deprecated: foo" } |
| 12 | qux c; // { dg-warning "is deprecated: baz" } |
| 13 | } |