blob: 0c8236272f0886e488bb4f42b8bddb251494b69b [file] [log] [blame]
// { dg-do assemble }
// prms-id: 9068
struct ostream {
void operator<< (int); // { dg-error "candidate function not viable" }
};
class C {
public:
static int& i (); // { dg-error "possible target for call" }
static int& i (int signatureDummy); // { dg-error "possible target for call" }
};
void foo (ostream& lhs, const C& rhs)
{
lhs << rhs.i; // { dg-error "reference to overloaded function could not be resolved|invalid operands to binary expression" }
}
int& C::i () {
static int _i = 4711;
return _i;
}