I just found out how to check if operator<< is provided for a type. template<class T> T& lvalue_of_type();