Unit-interval constrained value checker.  
 More...
#include <UnitInterval.hpp>
 | 
| 
using  | exception_type = std::invalid_argument | 
|   | Exception type possibly thrown by this checker. 
  | 
|   | 
 | 
| constexpr auto  | operator() () noexcept -> decltype(static_cast< T >(0)) | 
|   | Valid value supplying functor.  More...
  | 
|   | 
| constexpr auto  | operator() (const T &v) -> decltype((v >=static_cast< T >(0) &&v<=static_cast< T >(1)), T(v)) | 
|   | Value checking functor.  More...
  | 
|   | 
template<typename T>
struct playrho::UnitIntervalChecker< T >
Unit-interval constrained value checker. 
Provides functors ensuring values are: greater-than or equal-to zero, and less-than or equal-to one. 
- Note
 - This is meant to be used as a checker with types like 
CheckedValue.  
- See also
 - CheckedValue. 
 
 
◆ operator()() [1/2]
Valid value supplying functor. 
- Returns
 - Zero casted to the checked type. 
 
 
 
◆ operator()() [2/2]
template<typename T > 
  
  
      
        
          | constexpr auto playrho::UnitIntervalChecker< T >::operator()  | 
          ( | 
          const T &  | 
          v | ) | 
           -> decltype((v >= static_cast<T>(0) && v <= static_cast<T>(1)), T(v))
     | 
         
       
   | 
  
inlineconstexpr   | 
  
 
Value checking functor. 
- Exceptions
 - 
  
    | exception_type | if 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: