blob: 1a53704c1e6819897bbb7328386d6d3a2650aafd [file] [log] [blame]
Anders Carlsson0dde18e2009-08-28 15:18:15 +00001// RUN: clang-cc -fsyntax-only -verify %s
2
3template<typename T> struct A {
4 void f() { }
5 struct N { };
6};
7
8template<typename T> struct B : A<T> {
9 using A<T>::f;
10 using A<T>::N;
11
12 using A<T>::foo; // expected-error{{no member named 'foo'}}
13 using A<double>::f; // expected-error{{using declaration refers into 'A<double>::', which is not a base class of 'B'}}
14};
15
16B<int> a; // expected-note{{in instantiation of template class 'struct B<int>' requested here}}
Anders Carlsson36ef0782009-08-28 17:57:07 +000017
18template<typename T> struct C : A<T> {
19 using A<T>::f;
20
21 void f() { };
22};
Anders Carlsson203cb712009-08-29 00:56:38 +000023
24template <typename T> struct D : A<T> {
25 using A<T>::f;
26
27 void f();
28};
29
30template<typename T> void D<T>::f() { }
Anders Carlsson598da5b2009-08-29 01:06:32 +000031
32template<typename T> struct E : A<T> {
33 using A<T>::f;
34
35 void g() { f(); }
36};