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

No-op value checker. More...

#include <playrho/detail/Checked.hpp>

Public Member Functions

constexpr auto operator() () noexcept -> decltype(T())
 Default value supplying functor. More...
 
constexpr auto operator() (const T &) noexcept -> const char *
 Value checking functor. More...
 

Detailed Description

template<class T>
struct playrho::detail::NoOpChecker< T >

No-op value checker.

Provides functors for a no-operation style checker. This simply always returns nullptr in the one-parameter value checking functor and returns the template specified type's default value from the no-parameter functor.

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

Member Function Documentation

◆ operator()() [1/2]

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

Default value supplying functor.

Returns
Always returns defaulted value of class template's given type parameter.

◆ operator()() [2/2]

template<class T >
constexpr auto playrho::detail::NoOpChecker< T >::operator() ( const T &  ) -> const char *
inlineconstexprnoexcept

Value checking functor.

Returns
Always nullptr, in a conceivably no-operation style.

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