aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C
blob: 0821fc094932860f4e33b8bdeba25234769322f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Only print template subst context when it isn't redundant.
// { dg-require-effective-target c++11 }
// { dg-prune-output "error" }

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

template <class T, class U = typename A<T>::type>
void f(T);

template <class T, class U = typename T::type>
void g(T);

int main()
{
  f(1);				// { dg-message "required from here" }
  g(1);				// { dg-bogus "required from here" }
}