fb4cef5b61
Introduce some concepts for enum and flags handling, goodbye and thanks for all the fish std::enable_if.
18 lines
300 B
C++
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
|