| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
|
| 3 |
template<template<class> class TT> struct X { }; |
| 4 |
template<class> struct Y { }; |
| 5 |
template<class T> using Z = Y<T>; |
| 6 |
|
| 7 |
void f(X<Y>); |
| 8 |
void g(X<Z>); |
| 9 |
|
| 10 |
void |
| 11 |
foo() |
| 12 |
{ |
| 13 |
// Below x and y have the same type (DR 1286) |
| 14 |
X<Y> y; |
| 15 |
X<Z> z; |
| 16 |
|
| 17 |
// ... So these must compile. |
| 18 |
f(z); // { dg-bogus "" } |
| 19 |
g(y); // { dg-bogus "" } |
| 20 |
} |
| 21 |
|
| 22 |
template<class> struct A0 {}; |
| 23 |
template<class T> using AA0 = A0<T>; |
| 24 |
template<class T> using AAA0 = AA0<T>; |
| 25 |
|
| 26 |
void f0(A0<int>); |
| 27 |
void |
| 28 |
g0() |
| 29 |
{ |
| 30 |
AA0<int> a; |
| 31 |
AAA0<int> b; |
| 32 |
f0(a); |
| 33 |
f0(b); |
| 34 |
} |
| 35 |
|
| 36 |
|