Similar to std::integral_constant, but with the fun property that the type can be floating-point. More...
#include <integer_constant.hpp>
Public Types | |
using | ValueType = T |
Public Member Functions | |
constexpr | operator T () const |
constexpr auto | operator() () const |
Static Public Attributes | |
constexpr static T | value = (T) V |
Similar to std::integral_constant, but with the fun property that the type can be floating-point.
Although floating-point tparams are not allowed in C++17, there's no reason we can't allow an integral constant to logically be of floating point type (and implicitly convert to such). We just have to specify its value using an integer.