Skip to main content

_t Struct Template

Deprecated generic strongly-typed wrapper for explicit type conversion. More...

Declaration​

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

Included Headers​

Base struct​

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​

constexpr_t (const T &t)

Constructor for the deprecated strongly-typed wrapper. 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>
Tepsilon = T{}

The epsilon value used for floating-point comparisons. More...

template <class T>
Tvalue_ {}

The stored value. More...

Description​

Deprecated generic strongly-typed wrapper for explicit type conversion.

The _t template provides a public, strongly-typed wrapper for any type T, enabling explicit conversion of dynamic values and expressions to a type recognised by the µTest++ comparators and reporting mechanisms.

This wrapper inherits from type_traits::value<T>, ensuring that the encapsulated value is treated as the specified type within the framework.

Deprecated

Use to_t (since 3.2.0).

Definition at line 651 of file literals.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 523 of file type-traits.h.

523 using value_type = T;

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 538 of file type-traits.h, definition at line 84 of file type-traits-inlines.h.

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

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 548 of file type-traits.h, definition at line 95 of file type-traits-inlines.h.

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

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​

epsilon​

template <class T>
T micro_os_plus::micro_test_plus::type_traits::value< T >::epsilon = T{}

The epsilon value used for floating-point comparisons.

This instance member defines the precision for comparisons. It is set via the constructor, either explicitly or computed as a default based on the number of decimal digits in the value. Each instance carries its own epsilon, so two value<T> objects with different precisions do not interfere with each other.

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

765 T epsilon = T{};

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.2 by Doxygen 1.17.0.