diff --git a/include/internal/catch_approx.hpp b/include/internal/catch_approx.hpp index f5dba61a..8b075515 100644 --- a/include/internal/catch_approx.hpp +++ b/include/internal/catch_approx.hpp @@ -81,8 +81,7 @@ namespace Detail { }; } -template<> -inline std::string toString( Detail::Approx const& value ) { +inline std::string toString( Detail::Approx const& value ) { return value.toString(); } diff --git a/include/internal/catch_exception_translator_registry.hpp b/include/internal/catch_exception_translator_registry.hpp index a1cc7050..29ddf8e7 100644 --- a/include/internal/catch_exception_translator_registry.hpp +++ b/include/internal/catch_exception_translator_registry.hpp @@ -35,7 +35,7 @@ namespace Catch { throw; } @catch (NSException *exception) { - return toString( [exception description] ); + return Catch::toString( [exception description] ); } #else throw; diff --git a/include/internal/catch_tostring.h b/include/internal/catch_tostring.h index 674533ff..1c30b203 100644 --- a/include/internal/catch_tostring.h +++ b/include/internal/catch_tostring.h @@ -219,10 +219,9 @@ std::string toString( std::nullptr_t ); std::ostringstream oss; oss << "{ "; if( first != last ) { - oss << toString( *first ); - for( ++first ; first != last ; ++first ) { - oss << ", " << toString( *first ); - } + oss << Catch::toString( *first ); + for( ++first ; first != last ; ++first ) + oss << ", " << Catch::toString( *first ); } oss << " }"; return oss.str(); diff --git a/include/internal/catch_tostring.hpp b/include/internal/catch_tostring.hpp index 9b234b18..21ee45f7 100644 --- a/include/internal/catch_tostring.hpp +++ b/include/internal/catch_tostring.hpp @@ -75,7 +75,7 @@ std::string toString( std::wstring const& value ) { s.reserve( value.size() ); for(size_t i = 0; i < value.size(); ++i ) s += value[i] <= 0xff ? static_cast( value[i] ) : '?'; - return toString( s ); + return Catch::toString( s ); } std::string toString( const char* const value ) { @@ -112,7 +112,7 @@ std::string toString( unsigned long value ) { } std::string toString( unsigned int value ) { - return toString( static_cast( value ) ); + return Catch::toString( static_cast( value ) ); } template diff --git a/include/reporters/catch_reporter_junit.hpp b/include/reporters/catch_reporter_junit.hpp index 1108794b..f9524aaf 100644 --- a/include/reporters/catch_reporter_junit.hpp +++ b/include/reporters/catch_reporter_junit.hpp @@ -135,7 +135,7 @@ namespace Catch { xml.writeAttribute( "classname", className ); xml.writeAttribute( "name", name ); } - xml.writeAttribute( "time", toString( sectionNode.stats.durationInSeconds ) ); + xml.writeAttribute( "time", Catch::toString( sectionNode.stats.durationInSeconds ) ); writeAssertions( sectionNode );