PlayRho  2.0.0
An interactive physics engine & library.
playrho::detail::FiniteChecker< T > Struct Template Reference

Finite constrained value checker. More...

#include <playrho/detail/FiniteChecker.hpp>

Public Member Functions

constexpr auto operator() () const noexcept(noexcept(static_cast< T >(0))) -> decltype(T{})
 Default value supplying functor. More...
 
auto operator() (const T &v) const noexcept(noexcept(isfinite(v))) -> decltype(isfinite(v), static_cast< const char * >(nullptr))
 Value checking functor. More...
 

Detailed Description

template<typename T>
struct playrho::detail::FiniteChecker< T >

Finite constrained value checker.

Note
This is meant to be used as a checker with types like Checked.
Template Parameters
TUnderlying type for this checker.
See also
Checked.

Member Function Documentation

◆ operator()() [1/2]

template<typename T >
constexpr auto playrho::detail::FiniteChecker< T >::operator() ( ) const -> decltype(T{})
inlineconstexprnoexcept

Default value supplying functor.

Returns
Always returns the zero initialized value of the underlying type.

◆ operator()() [2/2]

template<typename T >
auto playrho::detail::FiniteChecker< T >::operator() ( const T &  v) const -> decltype(isfinite(v), static_cast<const char*>(nullptr))
inlinenoexcept

Value checking functor.

Returns
Null string if given value is finite, else a non-null string explanation.

The documentation for this struct was generated from the following file: