Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/49520 |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 namespace x { void foo(); } | |
5 | |
6 template<typename T> | |
7 struct traits | |
8 { | |
9 static constexpr bool f() { return true; } | |
10 | |
11 static constexpr bool g() | |
12 { | |
13 using x::foo; | |
14 return f() && noexcept(foo()); | |
15 } | |
16 }; | |
17 | |
18 template struct traits<int>; |