summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/using14.C
blob: ebb4e090a37ca09b9aff2d186d852a306a1c08d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/26102

template <class T> struct B1 { int i(); };

struct B2 { int i(); };

template <class T> struct C : public B1<T>, public B2
{
  using B2::i;
  void f()
  {
    i();			// should be accepted
    i.i();			// { dg-error "member" }
  }
};

int main()
{
  C<int> c;
  c.f();			// { dg-message "instantiated" }
}