2 // { dg-do compile { target c++11 } }
3 // { dg-prune-output "note" }
5 template <template <typename... __ARGS> class _F, typename... _ARGS>
6 auto reverse (_ARGS... args) -> decltype(_F<_ARGS...>::call_function(args...)) {
7 return _F<_ARGS...>::call_function(args...);
10 template <typename _T>
11 _T sum(_T x) { return x; }
13 template <typename _T, typename... _ARGS>
14 _T sum(_T x, _ARGS... args) { return x + sum(args...); }
16 template <typename _T, typename... _ARGS>
18 static _T call_function(_T x1, _ARGS... args) { return sum(x1, args...); }
22 // This shouldn't be an error; this is bug 35722.
23 reverse<call_sum>(1,2); // { dg-bogus "no match" }
24 // { dg-bogus "sorry, unimplemented" "candidate explanation" { target *-*-* } 6 }