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.
This commit is contained in:
Andrew Foster 2016-10-10 11:27:32 +01:00
parent 71b969dec9
commit 87803cdd2d

View File

@ -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"