aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/ttp12.C
blob: 554738bf49b4864eb1b18da203a6a48a9702b504 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2004 Free Software Foundation
// Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
// { dg-do compile }

// Check the type of non-type parameter in template template parameter
// only if it is dependent.

template <template <int* p> class T>
struct X {};

template <typename U, template <U* p> class T>
struct Y {
    X<T> x;
};

template <int* p> struct Z {};

Y<int, Z> y1;
Y<char, Z> y2;		// { dg-error "mismatch|expected|invalid" }