1 // RUN: %clang_cc1 -fsyntax-only -verify %s
5 template<typename
> using fun_diff
= char; // expected-note 2{{type alias template declared here}}
8 template<typename T
, typename V
>
9 decltype(T::template fun_diff
<V
>) foo1() {}
10 // expected-note@-1 {{candidate template ignored: substitution failure [with T = test<int>, V = int]: 'test<int>::fun_diff' is expected to be a non-type template, but instantiated to a type alias template}}
14 // expected-error@+1 {{test<int>::fun_diff' is expected to be a non-type template, but instantiated to a type alias template}}
15 int a
= test
<T
>::template fun_diff
<int>;
18 template<typename T
, typename V
>
24 struct has_fun_diff
<T
, int> {
25 // expected-error@+1 {{'test<int>::fun_diff' is expected to be a non-type template, but instantiated to a type alias template}}
26 using type
= decltype(T::template fun_diff
<int>);
30 foo1
<test
<int>, int>(); // expected-error {{no matching function for call to 'foo1'}}
31 foo2
<int>(); // expected-note {{in instantiation of function template specialization}}
32 has_fun_diff
<test
<int>, int>::type a
; // expected-note {{in instantiation of template class}}