We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
string2optional
1 parent 742713f commit 5eee678Copy full SHA for 5eee678
src/util/string2int.h
@@ -107,7 +107,7 @@ auto wrap_string_conversion(do_conversiont do_conversion)
107
/// (unsigned) long long
108
/// does not accept negative inputs when the result type is unsigned
109
template <typename T>
110
-optionalt<T> string2optional(const std::string &str, int base)
+optionalt<T> string2optional(const std::string &str, int base = 10)
111
{
112
return wrap_string_conversion([&]() {
113
return narrow_or_throw_out_of_range<T>(string2optional_base<T>(str, base));
0 commit comments