fp
Functional Programming extensions to C++ for ROS projects.
fp::validate_range< T > Struct Template Reference

#include <validate.hpp>

Public Member Functions

constexpr Result< T > operator() (T value, std::string const &name) const
 

Public Attributes

from = std::numeric_limits<T>::min()
 
to = std::numeric_limits<T>::max()
 
std::optional< T > step = std::nullopt
 
double step_threshold = 1e-3
 

Detailed Description

template<typename T>
struct fp::validate_range< T >

Examples
validate_range.cpp.

Definition at line 52 of file validate.hpp.

Member Function Documentation

◆ operator()()

template<typename T >
constexpr Result<T> fp::validate_range< T >::operator() ( value,
std::string const &  name 
) const
inlineconstexpr

Definition at line 58 of file validate.hpp.

Member Data Documentation

◆ from

template<typename T >
T fp::validate_range< T >::from = std::numeric_limits<T>::min()
Examples
validate_range.cpp.

Definition at line 53 of file validate.hpp.

◆ step

template<typename T >
std::optional<T> fp::validate_range< T >::step = std::nullopt

Definition at line 55 of file validate.hpp.

◆ step_threshold

template<typename T >
double fp::validate_range< T >::step_threshold = 1e-3

Definition at line 56 of file validate.hpp.

◆ to

template<typename T >
T fp::validate_range< T >::to = std::numeric_limits<T>::max()

Definition at line 54 of file validate.hpp.