Quote every option type but integral types
Opt-in quoting was a bad choice, lets default to opt-out with all integral types non quoted.
This commit is contained in:
parent
5f825cf0f5
commit
b1187cf91d
|
@ -45,7 +45,7 @@ option_add_from_strings(T& opt, ConstArrayView<String> strs)
|
|||
template<typename T>
|
||||
constexpr bool option_needs_quoting(Meta::Type<T>)
|
||||
{
|
||||
return false;
|
||||
return not std::is_integral<T>::value;
|
||||
}
|
||||
|
||||
template<typename P, typename T>
|
||||
|
|
|
@ -68,7 +68,6 @@ Optional<int> str_to_int_ifp(StringView str);
|
|||
inline String option_to_string(StringView opt) { return opt.str(); }
|
||||
inline String option_from_string(Meta::Type<String>, StringView str) { return str.str(); }
|
||||
inline bool option_add(String& opt, StringView val) { opt += val; return not val.empty(); }
|
||||
constexpr bool option_needs_quoting(Meta::Type<String>) { return true; }
|
||||
|
||||
template<size_t N>
|
||||
struct InplaceString
|
||||
|
|
Loading…
Reference in New Issue
Block a user