From 87803cdd2d2ebfcf53e03035ee5872fe4b054c64 Mon Sep 17 00:00:00 2001 From: Andrew Foster Date: Mon, 10 Oct 2016 11:27:32 +0100 Subject: [PATCH] Fixed std::make_pair compile error with Oracle Solaris Studio 12.1 Building Catch with Oracle Solaris Studio 12.1 generates an error when deducing a std::string argument from a const char * while constructing a std::pair<> via std::make_pair. Providing an explicit nudge to the compiler resolves the problem. --- include/internal/catch_tag_alias_registry.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/internal/catch_tag_alias_registry.hpp b/include/internal/catch_tag_alias_registry.hpp index e5ad11b2..ca85bd2e 100644 --- a/include/internal/catch_tag_alias_registry.hpp +++ b/include/internal/catch_tag_alias_registry.hpp @@ -48,7 +48,7 @@ namespace Catch { oss << "error: tag alias, \"" << alias << "\" is not of the form [@alias name].\n" << lineInfo; throw std::domain_error( oss.str().c_str() ); } - if( !m_registry.insert( std::make_pair( alias, TagAlias( tag, lineInfo ) ) ).second ) { + if( !m_registry.insert( std::make_pair( std::string(alias), TagAlias( tag, lineInfo ) ) ).second ) { std::ostringstream oss; oss << "error: tag alias, \"" << alias << "\" already registered.\n" << "\tFirst seen at " << find(alias)->lineInfo << "\n"