11 #ifndef TLX_LOGGER_WRAP_UNPRINTABLE_HEADER 12 #define TLX_LOGGER_WRAP_UNPRINTABLE_HEADER 22 template <
typename,
typename =
void>
24 {
static constexpr
bool value =
false; };
26 template <
typename Type>
29 std::declval<std::ostream&>() << std::declval<Type const&>(), void())>
30 {
static constexpr
bool value =
true; };
34 template <
typename Type>
42 template <
typename Type>
50 template <
typename Type>
52 wrap_unp(Type,
const char* instead =
"<unprintable>") {
58 template <
typename Type>
66 #endif // !TLX_LOGGER_WRAP_UNPRINTABLE_HEADER static constexpr bool value
enable_if<!has_ostream_operator<Type >::value, const char * >::type wrap_unp(Type, const char *instead="<unprintable>")
SFINAE magic to return "<unprintable>" instead if the value HAS NO ostream operator << available...
enable_if<!has_ostream_operator<Type >::value, const char * >::type wrap_unprintable(Type, const char *instead="<unprintable>")
SFINAE magic to return "<unprintable>" instead if the value HAS NO ostream operator << available...
SFINAE enable_if – copy of std::enable_if<> with less extra cruft.
SFINAE magic helper for wrap_unprintable()