Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-switch.C
blob: ee94159f09d09e00f5be14f948b4104656c66bfe [
file
] [
log
] [
blame
]
// { dg-do compile { target c++11 } }
template
<
class
T
>
constexpr
T value
(
T t
=
T
())
{
return
t
;
}
enum
us_enum
{
us_item
=
value
<short>
()
};
// OK
void
func
(
us_enum n
)
{
switch
(
n
)
{
case
value
(
us_item
):
;
// #1 Error
default
:
;
}
}