summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p9068.C
blob: 2c62f5c79ab0d0483c6134e83fa80e454a0d33c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do assemble  }
// prms-id: 9068

struct ostream {
  void operator<< (int);	// { dg-message "operator|no known conversion" } fn ref in err msg
};

class C {
public:
  static int& i ();
  static int& i (int signatureDummy);
};

void foo (ostream& lhs, const C& rhs)
{
  lhs << rhs.i;		// { dg-error "match" } no such i for any opr << ()
  // { dg-message "candidate" "candidate note" { target *-*-* } 16 }
}

int& C::i () {
  static int _i = 4711;
  return _i;
}