diff --git a/include/internal/catch_tostring.hpp b/include/internal/catch_tostring.hpp index b6802af9..4d2be7b1 100644 --- a/include/internal/catch_tostring.hpp +++ b/include/internal/catch_tostring.hpp @@ -73,6 +73,7 @@ inline std::string toString( const std::string& value ) { return "\"" + value + "\""; } +#ifdef wchar_t inline std::string toString( const std::wstring& value ) { std::ostringstream oss; oss << "\""; @@ -81,6 +82,7 @@ inline std::string toString( const std::wstring& value ) { oss << "\""; return oss.str(); } +#endif inline std::string toString( const char* const value ) { return value ? Catch::toString( std::string( value ) ) : std::string( "{null string}" ); diff --git a/single_include/catch.hpp b/single_include/catch.hpp index cd5bd053..f5918910 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -545,6 +545,7 @@ inline std::string toString( const std::string& value ) { return "\"" + value + "\""; } +#ifdef wchar_t inline std::string toString( const std::wstring& value ) { std::ostringstream oss; oss << "\""; @@ -553,6 +554,7 @@ inline std::string toString( const std::wstring& value ) { oss << "\""; return oss.str(); } +#endif inline std::string toString( const char* const value ) { return value ? Catch::toString( std::string( value ) ) : std::string( "{null string}" );