MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / convertInto

Function convertInto

Bcore/src/main/cpp/Dobby/tests/catch.hpp:5648–5656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5646};
5647
5648template <typename T> inline auto convertInto(std::string const &source, T &target) -> ParserResult {
5649 std::stringstream ss;
5650 ss << source;
5651 ss >> target;
5652 if (ss.fail())
5653 return ParserResult::runtimeError("Unable to convert '" + source + "' to destination type");
5654 else
5655 return ParserResult::ok(ParseResultType::Matched);
5656}
5657inline auto convertInto(std::string const &source, std::string &target) -> ParserResult {
5658 target = source;
5659 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