aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/fn-template21.C
blob: 7b3f26bbfa03c70bf9697e86e34b396d6c736285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// PR c++/97010
// { dg-do compile { target c++20 } }

namespace M {
  struct S { int x; };
  S foo ();

  template<typename>
  void get (S);
}

template<typename T>
void bar (const T& t)
{
  get<int>(t);
}

int
main ()
{
  auto a = M::foo ();
  get<int>(a);
  bar (a);
}