gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C
raw| 1 | // Only print template subst context when it isn't redundant. |
| 2 | // { dg-require-effective-target c++11 } |
| 3 | // { dg-prune-output "error" } |
| 4 | |
| 5 | template<class T> struct A { typedef typename T::type type; }; |
| 6 | |
| 7 | template <class T, class U = typename A<T>::type> |
| 8 | void f(T); |
| 9 | |
| 10 | template <class T, class U = typename T::type> |
| 11 | void g(T); |
| 12 | |
| 13 | int main() |
| 14 | { |
| 15 | f(1); // { dg-message "required from here" } |
| 16 | g(1); // { dg-bogus "required from here" } |
| 17 | } |