aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/ttp9.C
blob: 060ab7788aeef25e033f548929c8f3b0fe13a354 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do compile }

// Origin: David Abrahams <dave@boost-consulting.com>
//	   Wolfgang Bangerth <bangerth@ticam.utexas.edu>

// PR c++/12170: Deducing template template parameter from nested
// class template.

template <typename> struct W {};

template< template<typename> class F, typename T>
int foo(W< F<T> >);


template<typename T>
struct L  {
    static int const value = sizeof(foo(W<T>()));
    typedef T type;
};


template <typename>
struct Y {
    template <typename> struct X { typedef int type; };
    typedef typename L<X<int> >::type type;
};

template struct Y<int>;