From 074666d298666e89bd02d8dc74843050f11f0a8a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 24 May 2017 15:40:16 +0100 Subject: [PATCH] Small code tweak --- src/option_types.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/option_types.hh b/src/option_types.hh index 7cdfb48d..81dca3bd 100644 --- a/src/option_types.hh +++ b/src/option_types.hh @@ -27,9 +27,9 @@ template typename std::enable_if::value, String>::type option_type_name(Meta::Type) { - constexpr StringView type = with_bit_ops(Meta::Type{}) ? "flags" : "enum"; - auto name = enum_desc(Meta::Type{}); - return type + "(" + join(name | transform(std::mem_fn(&EnumDesc::name)), '|') + ")"; + return format("{}({})", with_bit_ops(Meta::Type{}) ? "flags" : "enum", + join(enum_desc(Meta::Type{}) | + transform(std::mem_fn(&EnumDesc::name)), '|')); } inline String option_to_string(int opt) { return to_string(opt); }