kakoune/src/enum.hh
Maxime Coste fb4cef5b61 Replace std::enable_if with requires
Introduce some concepts for enum and flags handling, goodbye and
thanks for all the fish std::enable_if.
2021-11-21 09:44:56 +11:00

18 lines
300 B
C++

#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