summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb24.C
blob: 5e2a3ee45b3a9067834c96f519b51a68e07eb0b7 (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  }
#include <iostream>

template < class T >
class X
{
  protected:

    union {
        int     x;
        double  y;
    };
};

template < class T >
class Y : public X<T>
{
  public:

    using X<T>::x;

    void        f () { std::cout << this->x << std::endl; }
};