comparison gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
8 template<class T> 8 template<class T>
9 constexpr T value(T t) noexcept(is_funny<T>::value) { return t; } // Line 7 9 constexpr T value(T t) noexcept(is_funny<T>::value) { return t; } // Line 7
10 10
11 constexpr bool ok = noexcept(value(42)); 11 constexpr bool ok = noexcept(value(42));
12 12
13 static_assert(ok, "Assertion failure"); 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");