repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
/cp
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-switch1.C
blob
add732320f4c28841ef8f1a9f06f3432cbae2d66
1
// { dg-do compile { target c++14 } }
2
3
constexpr int f (int i)
4
{
5
switch (i)
6
{
7
case 1:
8
return 42;
9
default:
10
return 0;
11
}
12
}
13
14
constexpr int i = f(1);
15
#define SA(X) static_assert((X),#X)
16
SA(i==42);