Is it possible to define a macro that checks if a value falls within value range for any given sequential enum?
Given an enum which is assigned sequentially (i.e. the first value is 0 and the last value is the number of enumerations – 1), we can check if a value is a valid enum value like so:
Is it possible to detect whether an enum has no explicit underlying type?
I have a template function that operates on a generic type T
as input. I statically assert that T
is an enum.
Is it possible to detect whether an enum has no fixed underlying type?
I have a template function that operates on a generic type T
as input. I statically assert that T
is an enum.