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
PR c++/85765 - SFINAE and non-type default template arg.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-switch.C
blob
ee94159f09d09e00f5be14f948b4104656c66bfe
1
// { dg-do compile { target c++11 } }
2
3
template<class T>
4
constexpr T value(T t = T()) { return t; }
5
6
enum us_enum { us_item = value<short>() }; // OK
7
8
void func(us_enum n) {
9
switch (n) {
10
case value(us_item): ; // #1 Error
11
default: ;
12
}
13
}