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
/cp
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
auto-fn50.C
blob
a2c7e40755b044fcf2f9daadb256770f349c20df
1
// PR c++/84906
2
// { dg-do compile { target c++14 } }
3
4
extern "C" int puts(const char*);
5
6
struct aa {
7
operator auto() {
8
puts("auto");
9
return false;
10
}
11
explicit operator bool() {
12
puts("bool");
13
return true;
14
}
15
};
16
17
int main() {
18
aa x;
19
if (x) // { dg-error "ambiguous" }
20
puts("here");
21
else
22
puts("there");
23
}