summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/template-id-2.C
blob: 6d37350e93b4f91be38a173b1c2760a1b45e04e3 (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 "no member" }
    }
};

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