1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#ifndef enum_hh_INCLUDED #define enum_hh_INCLUDED #include "string.hh" #include "meta.hh" namespace Kakoune { template<typename T> struct EnumDesc { T value; StringView name; }; template<typename T> concept DescribedEnum = requires { enum_desc(Meta::Type<T>{}); }; } #endif // enum_hh_INCLUDED