Use a struct WorstMatch instead of varargs for the fallback option_add
varargs cannot handle non pod types.
This commit is contained in:
parent
4f98677642
commit
ea6994dd3b
|
@ -214,7 +214,9 @@ inline bool option_add(StronglyTypedNumber<RealType, ValueType>& opt,
|
||||||
return val != 0;
|
return val != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool option_add(...)
|
struct WorstMatch { template<typename T> WorstMatch(T&&) {} };
|
||||||
|
|
||||||
|
inline bool option_add(WorstMatch, StringView str)
|
||||||
{
|
{
|
||||||
throw runtime_error("no add operation supported for this option type");
|
throw runtime_error("no add operation supported for this option type");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user