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

Function convertInto

tests/catch.hpp:6959–6967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6957
6958 template<typename T>
6959 inline auto convertInto( std::string const &source, T& target ) -> ParserResult {
6960 std::stringstream ss;
6961 ss << source;
6962 ss >> target;
6963 if( ss.fail() )
6964 return ParserResult::runtimeError( "Unable to convert '" + source + "' to destination type" );
6965 else
6966 return ParserResult::ok( ParseResultType::Matched );
6967 }
6968 inline auto convertInto( std::string const &source, std::string& target ) -> ParserResult {
6969 target = source;
6970 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