OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2012-12-15 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-switch2.C
1
// Test for constexpr conversion in case context
2
// { dg-options -std=c++0x }
3
4
enum class E { e1, e2 };
5
6
struct A
7
{
8
E e;
9
constexpr operator E() { return e; }
10
constexpr A(E e): e(e) { }
11
};
12
13
E e;
14
15
int main()
16
{
17
switch (e)
18
{
19
case A(E::e1):
20
case A(E::e2):
21
;
22
}
23
}