testsuite: update mangling
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / nontype-class8.C
blobaf22a9389be00f88fdcd7ddda2530bf853ee8348
1 // If the entity is a template parameter object for a template parameter of
2 // type T, the type of the expression is const T.
4 // { dg-do compile { target c++20 } }
6 template <class T, class U> struct same;
7 template <class T> struct same<T,T> {};
9 struct A {
10   int i;
11   // auto operator<=> (const A&) = default;
13 void f(A&) = delete;
14 void f(const A&) { }
16 template < A a > struct B
18   B()
19   {
20     f(a);
21     same<A,decltype(a)> s;
22     same<const A&,decltype((a))> s2;
23   }
26 B<A{42}> b;