diff --git a/include/internal/catch_tostring.h b/include/internal/catch_tostring.h index 21ab99a0..f72eeca3 100644 --- a/include/internal/catch_tostring.h +++ b/include/internal/catch_tostring.h @@ -20,13 +20,9 @@ #include "catch_objc_arc.hpp" #endif -#ifdef CATCH_CONFIG_CPP11_TUPLE #include -#endif -#ifdef CATCH_CONFIG_CPP11_IS_ENUM #include -#endif namespace Catch { @@ -52,14 +48,10 @@ std::string toString( char value ); std::string toString( signed char value ); std::string toString( unsigned char value ); -#ifdef CATCH_CONFIG_CPP11_LONG_LONG std::string toString( long long value ); std::string toString( unsigned long long value ); -#endif -#ifdef CATCH_CONFIG_CPP11_NULLPTR std::string toString( std::nullptr_t ); -#endif #ifdef __OBJC__ std::string toString( NSString const * const& nsstring ); @@ -72,26 +64,6 @@ namespace Detail { extern const std::string unprintableString; - #if !defined(CATCH_CONFIG_CPP11_STREAM_INSERTABLE_CHECK) - struct BorgType { - template BorgType( T const& ); - }; - - struct TrueType { char sizer[1]; }; - struct FalseType { char sizer[2]; }; - - TrueType& testStreamable( std::ostream& ); - FalseType testStreamable( FalseType ); - - FalseType operator<<( std::ostream const&, BorgType const& ); - - template - struct IsStreamInsertable { - static std::ostream &s; - static T const&t; - enum { value = sizeof( testStreamable(s << t) ) == sizeof( TrueType ) }; - }; -#else template class IsStreamInsertable { template @@ -104,9 +76,8 @@ namespace Detail { public: static const bool value = decltype(test(0))::value; }; -#endif -#if defined(CATCH_CONFIG_CPP11_IS_ENUM) + template::value > @@ -125,19 +96,14 @@ namespace Detail { ); } }; -#endif + template struct StringMakerBase { -#if defined(CATCH_CONFIG_CPP11_IS_ENUM) template static std::string convert( T const& v ) { return EnumStringMaker::convert( v ); } -#else - template - static std::string convert( T const& ) { return unprintableString; } -#endif }; template<> @@ -202,7 +168,6 @@ std::string toString( std::vector const& v ) { } -#ifdef CATCH_CONFIG_CPP11_TUPLE // toString for tuples namespace TupleDetail { @@ -242,7 +207,7 @@ struct StringMaker> { return os.str(); } }; -#endif // CATCH_CONFIG_CPP11_TUPLE + namespace Detail { template diff --git a/include/internal/catch_tostring.hpp b/include/internal/catch_tostring.hpp index e61191b9..f20c41a2 100644 --- a/include/internal/catch_tostring.hpp +++ b/include/internal/catch_tostring.hpp @@ -169,7 +169,6 @@ std::string toString( unsigned char value ) { return toString( static_cast( value ) ); } -#ifdef CATCH_CONFIG_CPP11_LONG_LONG std::string toString( long long value ) { std::ostringstream oss; oss << value; @@ -184,13 +183,10 @@ std::string toString( unsigned long long value ) { oss << " (0x" << std::hex << value << ')'; return oss.str(); } -#endif -#ifdef CATCH_CONFIG_CPP11_NULLPTR std::string toString( std::nullptr_t ) { return "nullptr"; } -#endif #ifdef __OBJC__ std::string toString( NSString const * const& nsstring ) {