| 1 |
// PR c++/101715 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
template <typename T> struct S { |
| 5 |
S<T> bar() noexcept(T::value); // #1 |
| 6 |
S<T> foo() noexcept(T::value); // #2 |
| 7 |
}; |
| 8 |
|
| 9 |
template <typename T> S<T> S<T>::foo() noexcept(T::value) {} // #3 |
| 10 |
|
| 11 |
template <typename T> struct S2 { |
| 12 |
S2<T> bar1() noexcept(T::value); |
| 13 |
S2<T> bar2() noexcept(T::value); |
| 14 |
S2<T> bar3() noexcept(T::value); |
| 15 |
S2<T> bar4() noexcept(T::value); |
| 16 |
S2<T> bar5() noexcept(T::value); |
| 17 |
S2<T> baz() noexcept(T::value2); |
| 18 |
S2<T> foo() noexcept(T::value); |
| 19 |
}; |
| 20 |
|
| 21 |
template <typename T> S2<T> S2<T>::foo() noexcept(T::value) {} |