diff --git a/include/internal/catch_common.hpp b/include/internal/catch_common.hpp index 87743ccb..7ad5b1ca 100644 --- a/include/internal/catch_common.hpp +++ b/include/internal/catch_common.hpp @@ -21,9 +21,11 @@ namespace Catch { bool contains( std::string const& s, std::string const& infix ) { return s.find( infix ) != std::string::npos; } + char toLowerCh(char c) { + return static_cast( ::tolower( c ) ); + } void toLowerInPlace( std::string& s ) { - std::transform( s.begin(), s.end(), s.begin(), - [](char c) { return static_cast(::tolower(c)); } ); + std::transform( s.begin(), s.end(), s.begin(), toLowerCh ); } std::string toLower( std::string const& s ) { std::string lc = s;