1 // RUN: %clang_cc1 -fsyntax-only -verify %s
6 template<typename T
> int foo(T
), bar(T
, T
); // expected-error{{single entity}}
11 namespace A
{ template<typename T
> struct Base
{ typedef T t
; }; } // expected-note {{member type 'test1::A::Base<char>' found}} expected-note 2{{declared here}}
12 namespace B
{ template<typename T
> struct Base
{ typedef T t
; }; } // expected-note {{member type 'test1::B::Base<int>' found}}
14 template<typename T
> struct Derived
: A::Base
<char>, B::Base
<int> {
15 typename
Derived::Base
<float>::t x
; // expected-error {{found in multiple base classes of different types}}
18 class X
: A::Base
<int> {}; // expected-note 2{{private}}
19 class Y
: A::Base
<float> {};
20 struct Z
: A::Base
<double> {};
22 Base
<double> b1
; // expected-error {{private}}
23 Use1::Base
<double> b2
; // expected-error {{private}}
27 Use2::Base
<double> b2
;
31 Use3::Base
<double> b2
;
36 struct A
{ static int x
; }; // expected-note 4{{member}}
37 struct B
{ template<typename T
> static T
x(); }; // expected-note 4{{member}}
38 struct C
{ template<typename T
> struct x
{}; }; // expected-note 3{{member}}
39 struct D
{ template<typename T
> static T
x(); }; // expected-note {{member}}
41 template<typename
...T
> struct X
: T
... {};
44 X
<A
, B
>::x
<int>(); // expected-error {{found in multiple base classes of different types}}
45 X
<A
, C
>::x
<int>(); // expected-error {{found in multiple base classes of different types}}
46 X
<B
, C
>::x
<int>(); // expected-error {{found in multiple base classes of different types}}
47 X
<A
, B
, C
>::x
<int>(); // expected-error {{found in multiple base classes of different types}}
48 X
<A
, B
, D
>::x
<int>(); // expected-error {{found in multiple base classes of different types}}