Add utility IsCompileTimeConstant and use it in HybridFunctor
All threads resolved!
All threads resolved!
Summary
The type-trait IsIntegralConstant
checks exactly for a type std::integral_constant<T,value>
but does not allow any derived classes or user-defined classes with the same interface. Example of such compile-time constant is std::is_same<S,T>
.
The new utility is directly used to implement HybridFunctor
to allow a wider range of compiler-time input.
Merge request reports
Activity
added feature label
requested review from @santiago.ospina
- Resolved by Simon Praetorius
added 1 commit
- a13521d2 - Check constexpr property of members in IsCompileTimeConstant
- Resolved by Simon Praetorius
I'm happy with this as is. But out of curiosity: Is there any application where you have something that looks like an
std::integral_constant
but is not derived from one? If not, we may simply check for the latter instead of introducing a new concept.
mentioned in commit 364d0fd4
Please register or sign in to reply