static void iteratorTest(const foo &x) { foo::const_iterator i = x.begin(); // { dg-error "incomplete type" "incomplete type" } // { dg-error "no matching" "no matching" { target *-*-* } 14 } for (; i; ++i) *i; }
// needed for operator==() of bar bool operator==(const foo& lhs, const foo& rhs) { return lhs.a() == rhs.a() && lhs.b() == rhs.b(); }
int main(void) { f.bar(); return(0); }
void fn() { f.bar(); // expected-error{{deleted function}} }
void non_member(foo obj) { obj.member(); }
bool operator < (const bar& rhs) const { return std::string(X->c_str()) < std::string(rhs.X->c_str()); }
void fn (int i) { using foo::x; using baz::x; x(i); // ERROR - ambiguous }