1 // { dg-do compile { target c++11 } }
2 
3 template<class T> struct S0 {};
4 template<class T> using AS0 = S0<T>;
5 
6 template<template<class> class TT>
7 void f(TT<int>);
8 
9 template class AS0<char>; // { dg-error "alias templ\[^\n\r\]*specialization\[^\n\r\]*after\[^\n\r\]*class" }
10 
11 void
foo()12 foo()
13 {
14   AS0<int> a;
15   f(a);
16 }
17 
18 template<class T, class U> struct Vector{};
19 template<class T> struct Alloc {};
20 
21 template<class T> using Vec = Vector<T, Alloc<T> >;
22 
23 template<class T> void g(Vector<T, Alloc<T> >);
24 
25 template<template<class T> class TT> void h(TT<int>); // { dg-message "" }
26 
27 void
bar()28 bar()
29 {
30   Vec<int> a;
31   g(a);
32   h(a); // { dg-error "no matching function|wrong number of template arguments" }
33 }
34