aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/nontype5.C
blob: e53b6c1a6548ac969ae77edd2ca0f05a9d107d6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-do compile }

// Origin: Ivan Godard <igodard@pacbell.net>
//	   Volker Reichelt <reichelt@gcc.gnu.org>

// PR c++/13797: ICE invalid nontype template parameter

template <int> struct A
{
    typedef A<0> B;
    template <B> struct C {};	// { dg-error "not a valid type" }
};

A<0> a;				// { dg-error "instantiated" }