So my limits are known by compile time. Sometimes I have the need to access the first/last values of my type without defining a variable.
Right now this isn't possible because the first/last methods are instance methods and I get this error from the compiler.
a nonstatic member reference must be relative to a specific object
Wouldn't it be a nice addition to the cyclic_value template variant that cannot change first/last during runtime, to make the first/last methods static const or even constexpr?
Hello, I'm using the cyclic_value like this:
So my limits are known by compile time. Sometimes I have the need to access the first/last values of my type without defining a variable. Right now this isn't possible because the first/last methods are instance methods and I get this error from the compiler.
Wouldn't it be a nice addition to the cyclic_value template variant that cannot change first/last during runtime, to make the first/last methods
static const
or evenconstexpr
?Best regards