mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-28 01:00:28 +03:00
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;
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user