value Struct Template
Struct template representing a generic value, accessible via a getter. More...
Declaration
struct micro_os_plus::micro_test_plus::type_traits::value<T> { ... }
Included Headers
Base struct
| struct | value_base_<T> |
|
Base struct template providing common storage and accessors for runtime value-wrapper types. More... | |
Public Member Typedefs Index
template <class T> | |
| using | value_type = T |
|
The type of the stored value. More... | |
Public Constructors Index
template <class T> | |
| constexpr | value (const T &_value) noexcept |
|
Constructs a value object with the specified value. More... | |
Public Operators Index
template <class T> | |
| constexpr | operator T () const noexcept |
|
Explicit conversion operator to the underlying value type. More... | |
Public Member Functions Index
template <class T> | |
| constexpr T | get (void) const noexcept |
|
Getter for the stored value. More... | |
Public Member Attributes Index
template <class T> | |
| T | value_ {} |
|
The stored value. More... | |
Description
Struct template representing a generic value, accessible via a getter.
- Template Parameters
-
T The type of the value to be encapsulated.
The value struct template encapsulates a value of type T. The stored value, explicit conversion operator, and getter are provided by the value_base_ base.
Definition at line 707 of file type-traits.h.
Public Member Typedefs
value_type
|
The type of the stored value.
Definition at line 514 of file type-traits.h.
Public Constructors
value()
| constexpr noexcept |
Constructs a value object with the specified value.
- Parameters
-
_value The value to be stored.
Definition at line 714 of file type-traits.h.
Public Operators
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.
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()
| 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.
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_
|
The stored value.
Definition at line 544 of file type-traits.h.
Referenced by micro_os_plus::micro_test_plus::type_traits::value_base_< T >::value_base_, micro_os_plus::micro_test_plus::type_traits::value_base_< T >::get and micro_os_plus::micro_test_plus::type_traits::value_base_< T >::operator T.
The documentation for this struct was generated from the following files:
Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.