Small code tweak
This commit is contained in:
parent
119a5b8442
commit
074666d298
|
@ -27,9 +27,9 @@ template<typename Enum>
|
||||||
typename std::enable_if<std::is_enum<Enum>::value, String>::type
|
typename std::enable_if<std::is_enum<Enum>::value, String>::type
|
||||||
option_type_name(Meta::Type<Enum>)
|
option_type_name(Meta::Type<Enum>)
|
||||||
{
|
{
|
||||||
constexpr StringView type = with_bit_ops(Meta::Type<Enum>{}) ? "flags" : "enum";
|
return format("{}({})", with_bit_ops(Meta::Type<Enum>{}) ? "flags" : "enum",
|
||||||
auto name = enum_desc(Meta::Type<Enum>{});
|
join(enum_desc(Meta::Type<Enum>{}) |
|
||||||
return type + "(" + join(name | transform(std::mem_fn(&EnumDesc<Enum>::name)), '|') + ")";
|
transform(std::mem_fn(&EnumDesc<Enum>::name)), '|'));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline String option_to_string(int opt) { return to_string(opt); }
|
inline String option_to_string(int opt) { return to_string(opt); }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user