13 namespace onnxruntime {
22 if (!str.empty() && str[0] ==
'-') {
28 if (!str.empty() &&
std::isspace(str[0], std::locale::classic())) {
33 is.imbue(std::locale::classic());
36 const bool parse_successful =
38 is.get() == std::istringstream::traits_type::eof();
39 if (!parse_successful) {
43 value = std::move(parsed_value);
53 if (str ==
"0" || str ==
"False" || str ==
"false") {
58 if (str ==
"1" || str ==
"True" || str ==
"true") {
bool TryParseStringWithClassicLocale(std::string_view str, T &value)
GLsizei const GLchar *const * string
GLsizei const GLfloat * value
basic_string_view< char > string_view
#define ORT_RETURN_IF_NOT(condition,...)
Status ParseStringWithClassicLocale(std::string_view s, T &value)
#define ORT_THROW_IF_ERROR(expr)