Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp1z/constexpr-if34.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
rev | line source |
---|---|
152 | 1 // PR c++/94937 - ICE with -Wall and constexpr if. |
2 // { dg-do compile { target c++17 } } | |
3 // { dg-options "-Wall" } | |
4 | |
5 struct B { | |
6 static constexpr bool foo() { return false; } | |
7 }; | |
8 | |
9 template<typename T> | |
10 struct C { | |
11 static void bar () | |
12 { | |
13 if constexpr (B::foo()) ; | |
14 } | |
15 }; |