diff --git a/include/internal/catch_tostring.h b/include/internal/catch_tostring.h index 4c7f0366..81c87231 100644 --- a/include/internal/catch_tostring.h +++ b/include/internal/catch_tostring.h @@ -64,13 +64,8 @@ namespace Catch { template typename std::enable_if< !std::is_enum::value && !std::is_base_of::value, - std::string>::type convertUnstreamable( T const& value ) { -#if !defined(CATCH_CONFIG_FALLBACK_STRINGIFIER) - (void)value; + std::string>::type convertUnstreamable( T const& ) { return Detail::unprintableString; -#else - return CATCH_CONFIG_FALLBACK_STRINGIFIER(value); -#endif } template typename std::enable_if< @@ -118,7 +113,11 @@ namespace Catch { static typename std::enable_if::value, std::string>::type convert( const Fake& value ) { - return Detail::convertUnstreamable( value ); +#if !defined(CATCH_CONFIG_FALLBACK_STRINGIFIER) + return Detail::convertUnstreamable(value); +#else + return CATCH_CONFIG_FALLBACK_STRINGIFIER(value); +#endif } };