mirror of
https://github.com/aantron/better-enums.git
synced 2025-12-06 16:56:42 +08:00
add Base to allow is_base_of to mimic is_enum
This commit is contained in:
parent
2fad3f60ee
commit
d22921e148
4
enum.h
4
enum.h
@ -485,6 +485,8 @@ struct _initialize_at_program_start {
|
||||
_initialize_at_program_start() { Enum::initialize(); }
|
||||
};
|
||||
|
||||
struct Base {};
|
||||
|
||||
} // namespace better_enums
|
||||
|
||||
|
||||
@ -588,7 +590,7 @@ BETTER_ENUMS_ID(GenerateSwitchType(Underlying, __VA_ARGS__)) \
|
||||
\
|
||||
} \
|
||||
\
|
||||
class Enum { \
|
||||
class Enum : better_enums::Base { \
|
||||
private: \
|
||||
typedef ::better_enums::optional<Enum> _optional; \
|
||||
typedef ::better_enums::optional<std::size_t> _optional_index; \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user