summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/ptrmem4.C
blob: 4725fb5c2376fe133408adf687b293d2351aa27b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }
// GROUPS passed pointers-to-members
class X   {
 private:
  int i;
 public:
  X(int k)			{ i=k; }
  int operator=(X &a)		{ return i = a.i; }
  int operator=(int ii)	{ return i = ii; }
};
int main(void)
{
  int (X::*op1_ptr)(X&);
  op1_ptr = &X::operator=;    // g++ gives error 
  return 0;
}