PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::NoOpChecker< T > Struct Template Reference

No-op value checker. More...

#include <CheckedValue.hpp>

Public Member Functions

constexpr auto operator() () noexcept -> decltype(T())
 Valid value supplying functor. More...
 
constexpr auto operator() (T v) noexcept -> decltype(T(v))
 Value checking functor. More...
 

Detailed Description

template<typename T>
struct playrho::NoOpChecker< T >

No-op value checker.

Provides functors ensuring values are the value given.

Template Parameters
TValue type to check (or pass-through in this case).
Note
This is meant to be used as a checker with types like CheckedValue.
See also
CheckedValue.

Member Function Documentation

◆ operator()() [1/2]

template<typename T >
constexpr auto playrho::NoOpChecker< T >::operator() ( ) -> decltype(T())
inlineconstexprnoexcept

Valid value supplying functor.

Returns
Default initialized value of the type.

◆ operator()() [2/2]

template<typename T >
constexpr auto playrho::NoOpChecker< T >::operator() ( v) -> decltype(T(v))
inlineconstexprnoexcept

Value checking functor.

Parameters
vValue to check or to just pass through in this case.
Exceptions
exception_typeif given value is not valid.
Returns
Value given if greater-than or equal-to zero and less-than or equal-to one.

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