![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
The multiplicative identity of T.
More...
Static Public Attributes | |
| static constexpr T | value {1} |
| The multiplicative identity value. | |
The multiplicative identity of T.
| T | numeric type |
Provides access to the multiplicative identity of T through its static member value . This value is the multiplicative identity; a * one<T>::value == a and one<T>::value * a == a are true for valid values of a of type T .
Users may specialize one for cv-unqualified program-defined types. Such specializations shall have a static member value with type T whose value is the multiplicative identity of T . A specialization is required if any of the following cases are true for the expression T{1} :
Because one_v binds a reference to value , every specialization must also provide a namespace-scope definition of value (a separate out-of-line definition, as required for ODR use in C++14); otherwise naming one_v for that type is ill-formed.
|
staticconstexpr |
The multiplicative identity value.