aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/fn-template7.C
blob: 2c5ee120dcd4ad132ff68935f40cb496e0c26ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// P0846R0
// { dg-do compile }
// { dg-options "-std=c++2a" }

struct undeclared<int> { }; // { dg-error "not a class template" }

int
main ()
{
  int foo (); // { dg-warning "empty parentheses" }
  int a, b = 10;
  a = foo<; // { dg-error "invalid template-argument-list|invalid" }
  a = foo < b; // { dg-error "invalid template-argument-list|invalid" }
  a = foo<b>; // { dg-error "after template-argument-list|invalid" }
  a = foo<b>(; // { dg-error "expected" }
  a = foo<b>(1; // { dg-error "expected" }
  a = foo<b>(1); // { dg-error "no matching" }
}