Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-noexcept.C
blob035afd13d398cf16cb8f4bc51e2edfc36ced54da
1 // { dg-do compile { target c++11 } }
3 template<class T>
4 struct is_funny {
5   static constexpr bool value = false;
6 };
8 template<class T>
9 constexpr T value(T t) noexcept(is_funny<T>::value) { return t; } // Line 7
11 constexpr bool ok = noexcept(value(42));
13 // We used to treat a call to a constexpr function as noexcept if
14 // the call was a constant expression.  We no longer do since
15 // c++/87603.
16 static_assert(!ok, "Assertion failure");