repo.or.cz
/
official-gcc
/
constexpr.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++/38064
[official-gcc/constexpr.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
enum3.C
blob
5ae5e1a9d664e08c7979a2651c26104ff5317371
1
// PR c++/38064
2
// { dg-options "-std=c++0x" }
3
// { dg-do run }
4
5
enum class E { elem };
6
7
template <class T>
8
void f (T t);
9
10
bool f (bool b) { return b; }
11
12
int main()
13
{
14
E e = E::elem;
15
if (!f (e == E::elem))
16
return 1;
17
if (!f (e <= E::elem))
18
return 1;
19
if (!f (e >= E::elem))
20
return 1;
21
if (f (e < E::elem))
22
return 1;
23
if (f (e > E::elem))
24
return 1;
25
if (f (e != E::elem))
26
return 1;
27
}