testsuite: update mangling
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / fn-template8.C
blob9cd28eed5d0088b1521610adfdc9490e4c1c9741
1 // P0846R0
2 // { dg-do compile }
3 // { dg-options "-std=c++2a" }
5 const unsigned long arr[10] = { 2 };
6 template<class T> struct S { int n; };
8 template <class T>
9 int fn1 (S<T>* s)
11   int i = 1;
12   return s->n < arr[i + 1];
15 template <class T>
16 int fn2 (S<T> s)
18   int i = 1;
19   return s.n < arr[i + 1];
22 template <class T>
23 int fn3 (S<T>* s)
25   int i = 1;
26   return s->template n < 1; // { dg-error "parse error in template argument list" }
29 template <class T>
30 int fn4 (S<T> s)
32   int i = 1;
33   return s.template n < 1; // { dg-error "parse error in template argument list" }