I\'m trying to write a type trait to detect if a type has overloaded operator<<() suitable to use to an output stream.
I\'m missing something because I\'m alwa
And to test for '>>' operator:
template class is_istreamable { template static auto test (int) -> decltype (std::declval() >> std::declval(), std::true_type ()); template static auto test (...) -> std::false_type; public: static const bool value = decltype (test (0))::value; };