14 #include <restinio/compiler_features.hpp> 16 #include <type_traits> 38 template<
typename T,
typename Storage_Type >
47 template<
typename T,
typename Storage_Type >
49 typename std::enable_if< !std::is_signed<T>::value,
bool >::
type 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?
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, std::optional< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in std::optional<Value_Type> if parameter exis...
void next_digit(T digit) noexcept
Try to add another digit to the accumulator.
bool m_overflow_detected
Overflow detection flag.
static constexpr storage_type value
std::enable_if< !std::is_signed< T >::value, bool >::type is_greater_than_maximum(Storage_Type, Storage_Type)
Helper class for accumulating integer value during parsing it from string (with check for overflow)...
T value() const noexcept
Get the current accumulator value.