14 #include <restinio/compiler_features.hpp> 16 #include <type_traits> 58 template<
typename T,
typename Ext >
61 template<
typename T >
62 struct extremum_value< T, check_positive_extremum >
64 using storage_type = std::make_unsigned_t<T>;
67 std::numeric_limits<T>::max() );
70 template<
typename T >
74 "extremum_value<T, check_negative_extremum> is defined only " 75 "for signed numeric types" );
84 "The integer representation is expected to be two's complement" );
storage_type m_current
The current value of the accumulator.
bool overflow_detected() const noexcept
Is overflow detected during previous call to next_digit?
void next_digit(T digit) noexcept
Try to add another digit to the accumulator.
bool m_overflow_detected
Overflow detection flag.
RESTINIO_NODISCARD std::enable_if< !std::is_signed< T >::value, bool >::type is_greater_than_maximum(Storage_Type, Storage_Type)
static constexpr storage_type value
RESTINIO_NODISCARD char to_lower_case(unsigned char ch)
Helper class for accumulating integer value during parsing it from string (with check for overflow)...
T value() const noexcept
Get the current accumulator value.
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...