arg_router
1.4.0
C++ command line argument parsing and routing
|
#include <arg_router/policy/min_max_value.hpp>
Public Member Functions | |
min_max_value_ct () noexcept | |
template<typename InputValueType , typename... Parents> | |
void | validation_phase (const InputValueType &value, [[maybe_unused]] const Parents &... parents) const |
Static Public Member Functions | |
template<typename T = MinType> | |
constexpr static auto | minimum_value (std::enable_if_t<!std::is_void_v< T >> *=nullptr) noexcept |
template<typename T = MaxType> | |
constexpr static auto | maximum_value (std::enable_if_t<!std::is_void_v< T >> *=nullptr) noexcept |
Compile-time equivalent to min_max_value_t.
Use the min_max_value() function to create for ease. operator<
is used for comparisons.
Using this policy also improves help output.
MinType | Compile-time integral constant value representing the minimum, or void if no minimum bound |
MaxType | Compile-time integral constant value representing the maximum, or void if no minimum bound |
Definition at line 98 of file min_max_value.hpp.
|
inlineexplicitnoexcept |
Constructor.
Definition at line 105 of file min_max_value.hpp.
|
inlinestaticconstexprnoexcept |
Returns the maximum value.
This method is only available if there is a maximum value.
Definition at line 148 of file min_max_value.hpp.
|
inlinestaticconstexprnoexcept |
Returns the minimum value.
This method is only available if there is a minimum value.
Definition at line 135 of file min_max_value.hpp.
|
inline |
Checks that value is between the minimum and maximum values.
InputValueType | Parsed value type, must be implicitly constructible from value_type |
Parents | Pack of parent tree nodes in ascending ancestry order |
value | Parsed input value to check |
parents | Parents instances pack |
multi_lang_exception | Thrown if the value is out of bounds |
Definition at line 164 of file min_max_value.hpp.