1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 template<typename T
> using U
= T
;
5 using I
= U
<U
<U
<U
<int>>>>;
8 template<typename A
, typename B
> using Fst
= A
;
9 template<typename A
, typename B
> using Snd
= B
;
11 using I
= Fst
<Snd
<char,int>,double>;
13 namespace StdExample
{
14 // Prerequisites for example.
15 template<class T
, class A
> struct vector
{ /* ... */ };
18 template<class T
> struct Alloc
{};
19 template<class T
> using Vec
= vector
<T
, Alloc
<T
>>;
23 void process(Vec
<T
>& v
) // expected-note {{previous definition is here}}
27 void process(vector
<T
, Alloc
<T
>>& w
) // expected-error {{redefinition of 'process'}}
30 template<template<class> class TT
>
31 void f(TT
<int>); // expected-note {{candidate template ignored}}
33 template<template<class,class> class TT
>
34 void g(TT
<int, Alloc
<int>>);
37 f(v
); // expected-error {{no matching function for call to 'f'}}
38 g(v
); // OK: TT = vector
42 // v's type is same as vector<int, Alloc<int>>.
43 using VTest
= vector
<int, Alloc
<int>>;
44 using VTest
= decltype(v
);