From 941f8de99afe28a8fdd3d31e6c79a5dac9c286d1 Mon Sep 17 00:00:00 2001 From: Wiscy Date: Wed, 30 Nov 2016 20:12:31 +0100 Subject: [PATCH] SunStudio 12.3 support: variadic macros --- include/internal/catch_compiler_capabilities.h | 4 +++- projects/SelfTest/ToStringPair.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h index 3e64b202..d7de401c 100644 --- a/include/internal/catch_compiler_capabilities.h +++ b/include/internal/catch_compiler_capabilities.h @@ -123,8 +123,10 @@ // Oracle Solaris Studio #ifdef __SUNPRO_CC +#define CATCH_INTERNAL_CONFIG_VARIADIC_MACROS +#define CATCH_INTERNAL_SUNPRO_CC_NON_COMPLIANT_STL +// OK with __SUNPRO_CC 0x5120 # if __SUNPRO_CC == 0x5100 // Oracle Solaris Studio version 12.1 -# define CATCH_INTERNAL_SUNPRO_CC_NON_COMPLIANT_STL # endif #endif // __SUNPRO_CC diff --git a/projects/SelfTest/ToStringPair.cpp b/projects/SelfTest/ToStringPair.cpp index 8f510700..59483ef8 100644 --- a/projects/SelfTest/ToStringPair.cpp +++ b/projects/SelfTest/ToStringPair.cpp @@ -30,7 +30,7 @@ TEST_CASE( "std::pair -> toString", "[toString][pair]" ) TEST_CASE( "std::vector > -> toString", "[toString][pair]" ) { std::vector > pr; - pr.push_back( std::make_pair("green", 55 ) ); + pr.push_back( std::make_pair(std::string("green"), 55 ) ); REQUIRE( Catch::toString( pr ) == "{ { \"green\", 55 } }" ); }