Skip to main content
1 of 2
Kain0_0
  • 16.6k
  • 19
  • 40

It's complaining because it cannot cast a Lambda Object to a pointer to a function.

You nee to capture the function as a plain type (say X) then pass it through to another meta function to decide if its callable.

template <typename X, typename enable_if = void>
struct CallAble
{};

template <typename X>
struct CallAble

std::void_t<decltype(std::declval<X>()(std::declval<T>(), std::declval<T>())>

Kain0_0
  • 16.6k
  • 19
  • 40