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;
}
Example #2
0
// 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();
}
Example #6
0
File: main.cpp Project: CCJY/coliru
 bool operator < (const bar& rhs) const
 {
     return std::string(X->c_str()) < std::string(rhs.X->c_str());
 }
Example #7
0
void fn (int i)
{
  using foo::x;
  using baz::x;
  x(i); 	 // ERROR - ambiguous
}