aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/template-id-2.C
blob: d214716cbe14ae235af730e6cd74357eab9325f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do compile }

// Origin: Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>

// PR c++/12924

template<typename> struct A {};

template<> struct A<void>
{
    template<typename T> void foo()
    {
        A<T> a;
        a.template foo<int>();	// { dg-error "member" }
    }
};

void bar()
{
    A<void> a;
    a.foo<int>();		// { dg-message "required" }
}