template // comment auto foo(T x) { ... }; namespace impl { template struct is_streamable() << std::declval())>> : std::true_type { }; } // Disable overload for already valid operands. template && std::is_convertible_v>> std::wostream &operator <<(std::wostream &stream, const T &thing) { return stream << static_cast(thing); } enum struct DataHolder { }; enum class DataThingy { }; enum class Boolean : char { True, False, FileNotFound }; union Soy { };