summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/ttp7.C
blob: 0bcaa8f729229c0e10b5f4c2ea00b8702d6e9673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do compile }
// Contributed by Andrew Pinski <pinskia at gcc dot gnu dot org>
// PR c++/13810: ICE while parsing invalid default argument for a 
//   template template parameter.

struct X;
template<int> struct A {};   

template<template<int> class = X > struct B1 {};     // { dg-error "as a default value" }
template<template<int> class = A<0> > struct B2 {};  // { dg-error "as a default value" }

template <typename T>
struct S {
  template <template <typename> class = S>   struct I1 {};  // { dg-error "as a default value" }
  template <template <typename> class = ::S> struct I2 {};
};