Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
sw::universal::Tracked< T, Strategy > Class Template Reference

Tracked<T> automatically selects the appropriate error tracking strategy based on the type's capabilities via error_tracking_traits<T>. More...

#include <tracked.hpp>

Inheritance diagram for sw::universal::Tracked< T, Strategy >:

Static Public Member Functions

static constexpr ErrorStrategy strategy () noexcept
 Get the strategy being used.
static constexpr const char * strategy_name () noexcept
 Get strategy name as string.

Detailed Description

template<typename T, ErrorStrategy Strategy = error_tracking_traits<T>::default_strategy>
class sw::universal::Tracked< T, Strategy >

Tracked<T> automatically selects the appropriate error tracking strategy based on the type's capabilities via error_tracking_traits<T>.

The strategy can be explicitly overridden via the second template parameter.

Member Function Documentation

◆ strategy()

template<typename T, ErrorStrategy Strategy = error_tracking_traits<T>::default_strategy>
constexpr ErrorStrategy sw::universal::Tracked< T, Strategy >::strategy ( )
inlinestaticconstexprnoexcept

Get the strategy being used.

◆ strategy_name()

template<typename T, ErrorStrategy Strategy = error_tracking_traits<T>::default_strategy>
constexpr const char * sw::universal::Tracked< T, Strategy >::strategy_name ( )
inlinestaticconstexprnoexcept

Get strategy name as string.


The documentation for this class was generated from the following file:
  • /home/runner/work/universal/universal/include/sw/universal/utility/tracked.hpp