summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/error10.C
blob: 26f7ca53f293c4d6cddfaa2d53cdb1ba60e314e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/21930
// Test case by Volker Reichelt
// { dg-do compile }

template<int> struct A {};

template<int N>
void foo(const A<N> &a)
{ -A<N>(a); } // { dg-error "\\(\\* & a\\)" "" }

void bar()
{
    foo(A<0>()); // { dg-message "instantiated from here" "" }
}