Consider these two functions:
template <class Type,
class = typename std::enable_if</*HAS OPERATOR <<*/>::type>
void f(std::ostream& stream, const Type& value);
template <class Type,
class... DummyTypes,
class = typename std::enable_if<sizeof...(DummyTypes) == 0>::type>
void f(std::ostream& stream, const Type& value, DummyTypes...);
As the non-variadic overload has the priority over the variadic overload, I want to check whether the type has the operator<<
with an std::ostream
using std::enable_if
in the first version.
So what should I write instead of /*HAS OPERATOR <<*/
?