gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept2.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | |
| 3 | template<class T> |
| 4 | constexpr T value(T t) { return t; } |
| 5 | |
| 6 | template<class T> |
| 7 | struct is_funny { |
| 8 | static constexpr bool value = false; |
| 9 | }; |
| 10 | |
| 11 | template<class T> |
| 12 | void eval() noexcept(value(is_funny<T>::value)) {} |
| 13 | |
| 14 | constexpr bool ok = noexcept(eval<int>()); // line 12 |