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
Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
parse
/
ref-qual1.C
blob
e3f60c09c8a888c4bfb88286810f7cfbd32a1413
1
// PR c++/57068
2
3
enum Enums {
4
Enum1 = 0x00000000,
5
Enum2 = 0x00000001
6
};
7
8
class Flags {
9
public:
10
Flags() : i(0) {}
11
Flags(int i): i(i) {}
12
Flags operator&(Enums f) { return Flags(Enums(i & f)); }
13
14
operator bool() { return i; }
15
private:
16
int i;
17
};
18
19
Flags windowState()
20
{
21
return Flags();
22
}
23
24
int main()
25
{
26
if (bool(windowState() & Enum1) == true)
27
return 1;
28
return 0;
29
}