MCPcopy Create free account
hub / github.com/Profactor/cv-plot / convertInto

Function convertInto

CvPlot/ext/catch2/inc/catch.hpp:8986–8994  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8984
8985 template<typename T>
8986 inline auto convertInto( std::string const &source, T& target ) -> ParserResult {
8987 std::stringstream ss;
8988 ss << source;
8989 ss >> target;
8990 if( ss.fail() )
8991 return ParserResult::runtimeError( "Unable to convert '" + source + "' to destination type" );
8992 else
8993 return ParserResult::ok( ParseResultType::Matched );
8994 }
8995 inline auto convertInto( std::string const &source, std::string& target ) -> ParserResult {
8996 target = source;
8997 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