MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / convertInto

Function convertInto

extlibs/catch/include/catch/catch.hpp:8753–8761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8751
8752 template<typename T>
8753 inline auto convertInto( std::string const &source, T& target ) -> ParserResult {
8754 std::stringstream ss;
8755 ss << source;
8756 ss >> target;
8757 if( ss.fail() )
8758 return ParserResult::runtimeError( "Unable to convert '" + source + "' to destination type" );
8759 else
8760 return ParserResult::ok( ParseResultType::Matched );
8761 }
8762 inline auto convertInto( std::string const &source, std::string& target ) -> ParserResult {
8763 target = source;
8764 return ParserResult::ok( ParseResultType::Matched );

Callers 4

setValueMethod · 0.85
setValueMethod · 0.85
invokeLambdaFunction · 0.85
makeCommandLineParserFunction · 0.85

Calls 3

failMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected