comparison 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
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
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 };