MCPcopy Create free account
hub / github.com/apache/trafficserver / convertInto

Function convertInto

lib/catch2/catch.hpp:9072–9080  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

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

Calls 4

tolowerFunction · 0.85
failMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected