aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/other/error10.C
blob: 546a4d65c4a74777c7a0979c57484e36deff7b95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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 "operand type is 'A<0>'" }

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