Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/nontype-auto13.C

raw
1 // PR c++/82331
2 // { dg-do compile { target c++17 } }
3
4 template <auto>
5 class X;
6
7 template <typename R, typename... A, R (*F) (A...)>
8 class X<F> {
9 public:
10 static R call (A... args)
11 {
12 return (*F)(args...);
13 }
14 };
15
16 int func (int a, int b) { return a + b; }
17
18 int test () { return X<&func>::call(1, 2); }