Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/overload31.C

raw
1 // { dg-do assemble }
2 // PRMS Id: 6568
3 // Bug: g++ complains about the ambiguous conversion to bool even though
4 // we wouldn't end up using it anyway.
5
6 class AString
7 {
8 public:
9 AString (unsigned len);
10 operator char *() const;
11 operator char const *() const;
12 };
13
14 void
15 foo(unsigned t, AString const & handle)
16 {
17 }
18
19 void
20 foo(AString const & handle, bool includeSpecials)
21 {
22 unsigned t;
23 foo(t, handle);
24 }