Skip to main content

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

Public Member Typedefs Index

template <auto N>
usingvalue_type = decltype(N)

The type of the constant value. More...

Public Operators Index

template <auto N>
constexproperator value_type (void) const

Explicit conversion operator to value_type. More...

template <auto N>
constexpr autooperator- () const

Unary minus operator. More...

Public Member Functions Index

template <auto N>
constexpr autoget (void) const

Getter for the constant value. More...

Public Static Attributes Index

template <auto N>
autovalue = N

The constant value. More...

Description

Struct template representing a generic integral constant.

Template Parameters
NThe 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

template <auto N>
using micro_os_plus::micro_test_plus::type_traits::integral_constant< N >::value_type = decltype (N)

The type of the constant value.

Definition at line 708 of file type-traits.h.

Public Operators

operator value_type()

template <auto N>
micro_os_plus::micro_test_plus::type_traits::integral_constant< N >::operator value_type (void) const
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-()

template <auto N>
auto micro_os_plus::micro_test_plus::type_traits::integral_constant< N >::operator- () const
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()

template <auto N>
auto micro_os_plus::micro_test_plus::type_traits::integral_constant< N >::get (void) const
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

template <auto N>
auto micro_os_plus::micro_test_plus::type_traits::integral_constant< N >::value = N
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.