aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/g++.dg/template/explicit-args1.C
blob: 10d59e157343ac3f937215f9174ea0a374f76269 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/34950

template <class T = int> struct policy {
    typedef int unnecessary;
};

template <class Policy> struct A {
    typedef int type;
    typedef typename Policy::unnecessary unused;
};

template <class T> struct S {
    typedef int type;
    typedef typename A<T>::type unused;
};

template <class, class T> typename S<T>::type         foo();
template <class>                   S<policy<> >::type foo();

template <typename T> int def(T);
const int i = def(foo<int>);