Skip to main content

genuine_integral_value Struct Template

Struct template representing a genuine integral value. More...

Declaration

template <class T>
struct micro_os_plus::micro_test_plus::type_traits::genuine_integral_value<T> { ... }

Included Headers

Base struct

structvalue_base_<T>

Base struct template providing common storage and accessors for runtime value-wrapper types. More...

Public Member Typedefs Index

template <class T>
usingvalue_type = T

The type of the stored value. More...

Public Constructors Index

template <class T>
constexprgenuine_integral_value (const T &_value) noexcept

Constructs a genuine_integral_value with the specified value. More...

Public Operators Index

template <class T>
constexproperator T () const noexcept

Explicit conversion operator to the underlying value type. More...

Public Member Functions Index

template <class T>
constexpr Tget (void) const noexcept

Getter for the stored value. More...

Public Member Attributes Index

template <class T>
Tvalue_ {}

The stored value. More...

Description

Struct template representing a genuine integral value.

Template Parameters
T

The type of the integral value.

The genuine_integral_value struct template encapsulates a runtime integral value. The stored value, explicit conversion operator, and getter are provided by the value_base_ base.

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

Public Member Typedefs

value_type

template <class T>
using micro_os_plus::micro_test_plus::type_traits::value_base_< T >::value_type = T

The type of the stored value.

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

514 using value_type = T;

Public Constructors

genuine_integral_value()

template <class T>
micro_os_plus::micro_test_plus::type_traits::genuine_integral_value< T >::genuine_integral_value (const T & _value)
constexpr noexcept

Constructs a genuine_integral_value with the specified value.

Parameters
_value

The integral value to be stored.

Delegates to value_base_<T>{ _value } to initialise the base.

Declaration at line 690 of file type-traits.h, definition at line 166 of file type-traits-inlines.h.

167 const T& _value) noexcept
168 : value_base_<T>{ _value }
169 {
170 }

Reference micro_os_plus::micro_test_plus::type_traits::value_base_< T >::value_base_.

Public Operators

operator T()

template <class T>
micro_os_plus::micro_test_plus::type_traits::value_base_< T >::operator T ()
explicit nodiscard constexpr noexcept

Explicit conversion operator to the underlying value type.

Returns

The stored value as type T.

Allows explicit conversion to the encapsulated value.

Declaration at line 529 of file type-traits.h, definition at line 83 of file type-traits-inlines.h.

83 operator T () const noexcept
84 {
85 return value_;
86 }

References micro_os_plus::micro_test_plus::type_traits::value_base_< T >::value_base_ and micro_os_plus::micro_test_plus::type_traits::value_base_< T >::value_.

Public Member Functions

get()

template <class T>
T micro_os_plus::micro_test_plus::type_traits::value_base_< T >::get (void)
nodiscard constexpr noexcept

Getter for the stored value.

Parameters

None.

Returns

The stored value.

Returns the stored value by value.

Declaration at line 539 of file type-traits.h, definition at line 94 of file type-traits-inlines.h.

94 value_base_<T>::get (void) const noexcept
95 {
96 return value_;
97 }

Reference micro_os_plus::micro_test_plus::type_traits::value_base_< T >::value_.

Referenced by micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<.

Public Member Attributes

value_

template <class T>
T micro_os_plus::micro_test_plus::type_traits::value_base_< T >::value_ {}

The documentation for this struct was generated from the following files:


Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.