summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.gb/scope11.C
blob: 45f540f9dfa069d949193a18b303b20b68d6e35e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do assemble  }
// GROUPS passed gb scope
template<class T, int N> class fixed_array {
public:
  T _array[N];
};

class Hash {
public:
  Hash (int);
};

typedef fixed_array<char, 4> ipAddress_t;

class IPAddress {
protected:
  long _i;
public:
  IPAddress (ipAddress_t ip) { }
  IPAddress () { }
  IPAddress netMask () { return *this; }
  operator Hash ();
};

IPAddress::operator Hash ()
{
  return Hash (_i);
}