2 // { dg-do compile { target c++11 } }
4 template <class,class> struct same;
5 template <class T> struct same<T,T> {};
7 template <class,class> struct different {};
8 template <class T> struct different<T,T>;
10 template<typename T, typename U = T> struct A;
11 template<template <class...> class> struct X;
14 template<typename V, typename W>
19 // not equivalent to A: not all parameters used
20 template<typename V, typename W>
23 different<X<A>,X<C>> d1;
25 // not equivalent to A: different number of parameters
29 different<X<A>,X<D>> d2;
31 // not equivalent to A: template-arguments in wrong order
32 template<typename V, typename W>
35 different<X<A>,X<E>> d3;
37 // equivalent to A: default arguments not considered
38 template<typename V, typename W = int>
43 // equivalent to A and B
44 template<typename V, typename W>
51 template<typename V, typename W>
56 // not equivalent to A: argument not identifier
57 template<typename V, typename W>
58 using I = A<V, typename W::type>;
60 different<X<A>,X<I>> d4;