gcc/testsuite/g++.dg/cpp0x/noexcept22.C
raw| 1 | // PR c++/60046 |
| 2 | // { dg-require-effective-target c++11 } |
| 3 | |
| 4 | constexpr bool foo () { return noexcept (true); } |
| 5 | template <typename T> |
| 6 | struct V |
| 7 | { |
| 8 | void bar (V &) noexcept (foo ()) {} |
| 9 | }; |
| 10 | template <typename T> |
| 11 | struct W : public V <int> |
| 12 | { |
| 13 | void bar (W &x) { V <int>::bar (x); } |
| 14 | }; |
| 15 | |
| 16 | int |
| 17 | main () |
| 18 | { |
| 19 | W <int> a, b; |
| 20 | a.bar (b); |
| 21 | } |