gcc/testsuite/g++.dg/cpp1y/noexcept2.C
raw| 1 | // PR c++/102338 |
| 2 | // { dg-do compile { target c++14 } } |
| 3 | |
| 4 | struct S { |
| 5 | template<typename T> |
| 6 | static auto f(T&& t) noexcept { |
| 7 | return true; |
| 8 | } |
| 9 | |
| 10 | template<typename T, typename... Ts> |
| 11 | static auto f(T&& t, Ts&& ... ts) noexcept(noexcept(f(ts...))) { |
| 12 | return f(ts...); |
| 13 | } |
| 14 | |
| 15 | }; |
| 16 | |
| 17 | int main() { |
| 18 | S::f(true, 0, 5u); |
| 19 | return 0; |
| 20 | } |