I know how to detect presence of a variable or a regular method in a C++ class. But how to do it, when the method is a template? Consider the code:
struct SomeClass
{
template<typename Sender, typename T>
auto& send(T& object) const
{
Sender::send(object);
return object;
};
};
How to write something like is_sendable
so that is_sendable<SomeClass>::value
(or any other syntax) returns true because SomeClass
has method send
like above ?