value_base Struct Template
Base struct template providing common storage and accessors for run-time value-wrapper types. More...
Declaration
struct micro_os_plus::micro_test_plus::detail::value_base<T> { ... }
Included Headers
Derived Structs
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a floating-point value with precision control. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a floating-point value with precision control. More... | |
Public Member Typedefs Index
template <class T> | |
| using | op_type = op |
|
Marker identifying the framework expression types. More... | |
template <class T> | |
| using | value_type = T |
|
The type of the stored value. More... | |
Public Constructors Index
template <class T> | |
| constexpr | value_base (const T &v) noexcept |
|
Constructs a value_base with the given 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 const T & | get (void) const noexcept |
|
Getter for the stored value. More... | |
Private Member Attributes Index
template <class T> | |
| T | value_ {} |
|
The stored value. More... | |
Description
Base struct template providing common storage and accessors for run-time value-wrapper types.
- Template Parameters
-
T The type of the stored value.
The value_base struct template stores the value in a private member, and provides an explicit operator T() conversion and a get() accessor, shared by integral_constant, value<T>, and the floating-point specialisation of value<T>.
It declares the op_type marker, so that all derived types satisfy the extension::is_op concept without each struct needing to declare it.
It does not derive from the empty op struct: a type with an empty base and only floating-point members, like value<float>, is a homogeneous floating-point aggregate whose parameter passing with C++17 and later changed in GCC 10.1, and GCC emits a -Wpsabi note for each function passing or returning it by value, like approx(), on AArch64 and on 32-bit Arm with the hard-float ABI.
Definition at line 351 of file deprecated.h.
Public Member Typedefs
op_type
|
Marker identifying the framework expression types.
Declared directly rather than inherited from op, to avoid the empty base; detected by the extension::is_op concept.
Definition at line 360 of file deprecated.h.
value_type
|
The type of the stored value.
Exposed for use by generic code that inspects wrapper types.
Definition at line 368 of file deprecated.h.
Public Constructors
value_base()
| explicit constexpr noexcept |
Constructs a value_base with the given value.
- Parameters
-
v The value to be stored.
Stores the supplied value in the value_ member.
Declaration at line 375 of file deprecated.h, definition at line 482 of file deprecated-inlines.h.
Reference micro_os_plus::micro_test_plus::detail::value_base< T >::value_.
Referenced by micro_os_plus::micro_test_plus::detail::value< T >::value and micro_os_plus::micro_test_plus::detail::value_base< T >::operator T.
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 383 of file deprecated.h, definition at line 492 of file deprecated-inlines.h.
References micro_os_plus::micro_test_plus::detail::value_base< T >::value_base and micro_os_plus::micro_test_plus::detail::value_base< T >::value_.
Public Member Functions
get()
| nodiscard constexpr noexcept |
Getter for the stored value.
Returns a reference, so that a wrapped object (for example a to_t<std::string>) is not copied each time it is compared or formatted.
- Parameters
None.
- Returns
A reference to the stored value.
Returns a const reference to the stored value, valid as long as the wrapper.
Declaration at line 398 of file deprecated.h, definition at line 504 of file deprecated-inlines.h.
Reference micro_os_plus::micro_test_plus::detail::value_base< T >::value_.
Private Member Attributes
value_
|
The stored value.
Set by the constructor. Derived wrappers and comparators access it via get() or the explicit conversion operator.
Definition at line 408 of file deprecated.h.
Referenced by micro_os_plus::micro_test_plus::detail::value_base< T >::value_base, micro_os_plus::micro_test_plus::detail::value_base< T >::get and micro_os_plus::micro_test_plus::detail::value_base< T >::operator T.
The documentation for this struct was generated from the following files:
Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.