4

I cant find a way to define a type like this:

template<typename TFirst, typename TSecond, typename ... Args>
using hasSomeFunc = decltype(std::declval<TSecond>().SomeFunc<TFirst, Args...>(std::declval<std::function<void(TFirst&)>>(), std::declval<TFirst&>(), std::declval<Args&>() ...));

My problem is that the compiler doesnt allow me to write that in the context:

std::declval<Args&>() ...

Is there a way to define the type of a variadic templated member function with variadic templated arguments?

I am using c++17.

Thanks so much in advance.

Iñigo
  • 97
  • 6
  • 7
    Please provide [MCVE](https://stackoverflow.com/help/minimal-reproducible-example), your example compiles just fine (after properly qualifying SomeFunc as a template): https://godbolt.org/z/U8xYi9 – Dan M. Jun 04 '19 at 10:59
  • Okay to be honest I catched there is something behind the code that is wrong and is completely out of the topic. So thank you so much for open my eyes on it. – Iñigo Jun 04 '19 at 11:25

0 Answers0