111
|
1 // PR c++/81102
|
|
2
|
|
3 template <typename FuncSig, FuncSig f>
|
|
4 struct HelperWrapper;
|
|
5
|
|
6 // [...]
|
|
7
|
|
8 template <typename Ret, Ret (&Func)()>
|
|
9 struct HelperWrapper<Ret (&)(), Func>
|
|
10 {
|
|
11 static inline int WrapFuncT(const int)
|
|
12 {
|
|
13 return 0; // Changed
|
|
14 }
|
|
15 };
|
|
16
|
|
17 // Unary
|
|
18 template <typename Ret, typename Arg1, Ret (&Func)(Arg1)>
|
|
19 struct HelperWrapper<Ret (&)(Arg1), Func>
|
|
20 {
|
|
21 static inline int WrapFuncT(const int)
|
|
22 {
|
|
23 return 1; // Changed
|
|
24 }
|
|
25 };
|
|
26
|
|
27 // Binary
|
|
28 template <typename Ret, typename Arg1, typename Arg2, Ret (&Func)(Arg1, Arg2)>
|
|
29 struct HelperWrapper<Ret (&)(Arg1, Arg2), Func>
|
|
30 {
|
|
31 static inline int WrapFuncT(const int)
|
|
32 {
|
|
33 return 2; // Changed
|
|
34 }
|
|
35 };
|
|
36
|
|
37 int main()
|
|
38 {
|
|
39 return 0;
|
|
40 }
|