Skip to main content

value_base_ Struct Template

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

Declaration

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

Included Headers

Base struct

structop

Empty base struct for all operator types. More...

Derived Structs

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a floating point value with precision control. More...

structgenuine_integral_value<T>

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

structvalue<T>

Struct template representing a generic value, accessible via a getter. More...

structvalue<T>

Struct template representing a floating point value with precision control. More...

Public Member Typedefs Index

template <class T>
usingvalue_type = T

The type of the stored value. More...

Public Constructors Index

template <class T>
constexprvalue_base_ (const T &v) noexcept

Constructs a value_base_ with the given 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

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

Template Parameters
T

The type of the stored value.

The value_base_ struct template provides the T value_{} member, an explicit operator T() conversion, and a get() accessor, shared by genuine_integral_value, value<T>, and the floating point specialisation value<T>.

It inherits from op so that all derived types satisfy the is_op concept without each struct needing to inherit from op directly.

Definition at line 509 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

value_base_()

template <class T>
micro_os_plus::micro_test_plus::type_traits::value_base_< T >::value_base_ (const T & v)
explicit constexpr noexcept

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.