MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / convertInto

Function convertInto

extern/Catch2/catch.hpp:9070–9078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9068
9069 template<typename T>
9070 inline auto convertInto( std::string const &source, T& target ) -> ParserResult {
9071 std::stringstream ss;
9072 ss << source;
9073 ss >> target;
9074 if( ss.fail() )
9075 return ParserResult::runtimeError( "Unable to convert '" + source + "' to destination type" );
9076 else
9077 return ParserResult::ok( ParseResultType::Matched );
9078 }
9079 inline auto convertInto( std::string const &source, std::string& target ) -> ParserResult {
9080 target = source;
9081 return ParserResult::ok( ParseResultType::Matched );

Callers 4

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

Calls 5

transformFunction · 0.85
moveFunction · 0.85
failMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected