|
micro-test-plus 6.0.0
µTest++ Testing Framework
|
Struct template representing a generic value, accessible via a getter. More...
#include "micro-os-plus/micro-test-plus.h"
Public Types | |
| using | op_type = op |
| Marker identifying the framework expression types. | |
| using | value_type = T |
| The type of the stored value. | |
Public Member Functions | |
| constexpr | value (const T &_value) noexcept |
| Constructs a value object with the specified value. | |
| constexpr const T & | get (void) const noexcept |
| Getter for the stored value. | |
| constexpr | operator T () const noexcept |
| Explicit conversion operator to the underlying value type. | |
Private Attributes | |
| T | value_ {} |
| The stored value. | |
| 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 628 of file deprecated.h.
|
inherited |
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.
|
inherited |
Exposed for use by generic code that inspects wrapper types.
Definition at line 368 of file deprecated.h.
|
constexprnoexcept |
| _value | The value to be stored. |
Delegates to value_base<T>{ _value } to initialise the base.
|
nodiscardconstexprnoexceptinherited |
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.
Returns a const reference to the stored value, valid as long as the wrapper.
Definition at line 504 of file deprecated-inlines.h.
References value_.
|
explicitnodiscardconstexprnoexceptinherited |
Allows explicit conversion to the encapsulated value.
Definition at line 491 of file deprecated-inlines.h.
References value_base(), and value_.
|
privateinherited |
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 value_base(), get(), and operator T().