comparison gcc/testsuite/g++.dg/cpp1y/noexcept1.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // PR c++/89873
2 // { dg-do compile { target c++14 } }
3
4 template <int> bool b;
5
6 template <typename>
7 struct C {
8 template <typename> friend int foo() noexcept(b<1>); // { dg-error "not usable in a constant expression|different exception specifier" }
9 };
10
11 template <typename> int foo() noexcept(b<1>);
12
13 auto a = C<int>();