The integral_constant
Struct Template Reference
Struct template representing a generic integral constant. More...
Declaration
template <auto N>
struct micro_os_plus::micro_test_plus::type_traits::integral_constant<N>
Included Headers
#include <micro-os-plus/micro-test-plus.h>
Public Member Typedefs Index
template <auto N> | |
using | value_type = decltype(N) |
The type of the constant value. More... | |
Public Operators Index
template <auto N> | |
constexpr | operator value_type (void) const |
Explicit conversion operator to value_type. More... | |
template <auto N> | |
constexpr auto | operator- () const |
Unary minus operator. More... | |
Public Member Functions Index
template <auto N> | |
constexpr auto | get (void) const |
Getter for the constant value. More... | |
Public Static Attributes Index
template <auto N> | |
auto | value = N |
The constant value. More... | |
Description
Struct template representing a generic integral constant.
- Template Parameters
N The compile-time constant value.
The integral_constant
struct template provides a compile-time constant value of an integral type, with additional utility features. It inherits from op
to enable unified handling within the µTest++ framework's type traits and metaprogramming utilities.
This struct template exposes the constant value via a static member, a getter method, and explicit conversion operators. It also provides a unary minus operator to obtain the negative value as a new integral_constant
instance.
Definition at line 703 of file type-traits.h.
Public Member Typedefs
value_type
|
The type of the constant value.
Definition at line 708 of file type-traits.h.
Public Operators
operator value_type()
| inlineexplicitnodiscardconstexpr |
Explicit conversion operator to value_type.
- Parameters
None.
- Returns
The constant value as type
value_type
.
Allows explicit conversion to the underlying value type.
Definition at line 741 of file type-traits.h.
operator-()
| inlinenodiscardconstexpr |
Unary minus operator.
- Returns
An
integral_constant
with value-N
.
Returns a new integral_constant
instance representing the negative of the current value.
Definition at line 725 of file type-traits.h.
Public Member Functions
get()
| inlinenodiscardconstexpr |
Getter for the constant value.
- Parameters
None.
- Returns
The constant value.
Returns the compile-time constant value.
Definition at line 757 of file type-traits.h.
Public Static Attributes
value
| constexprstatic |
The constant value.
Definition at line 713 of file type-traits.h.
The documentation for this struct was generated from the following file:
Generated via docusaurus-plugin-doxygen by Doxygen 1.14.0.