1#ifndef RITSUKO_FIND_EXTREMES_HPP
2#define RITSUKO_FIND_EXTREMES_HPP
52template<class Iterator, class Mask, class Type_ = typename std::remove_cv<typename std::remove_reference<decltype(*(std::declval<Iterator>()))>::type>::type>
54 static_assert(std::numeric_limits<Type_>::is_integer);
57 output.
has_zero = found(start, end, mask, 0);
58 output.
has_highest = found(start, end, mask, std::numeric_limits<Type_>::max());
60 if constexpr(std::numeric_limits<Type_>::is_signed) {
61 output.
has_lowest = found(start, end, mask, std::numeric_limits<Type_>::min());
80template<class Iterator, class Type_ = typename std::remove_cv<typename std::remove_reference<decltype(*(std::declval<Iterator>()))>::type>::type>
143template<class Iterator, class Mask, class Type_ = typename std::remove_cv<typename std::remove_reference<decltype(*(std::declval<Iterator>()))>::type>::type>
147 if constexpr(std::numeric_limits<Type_>::is_iec559) {
149 output.
has_nan = check_for_nan(start, end, mask);
152 auto inf = std::numeric_limits<Type_>::infinity();
157 output.
has_lowest = found(start, end, mask, std::numeric_limits<Type_>::lowest());
158 output.
has_highest = found(start, end, mask, std::numeric_limits<Type_>::max());
159 output.
has_zero = found(start, end, mask, 0);
177template<class Iterator, class Type_ = typename std::remove_cv<typename std::remove_reference<decltype(*(std::declval<Iterator>()))>::type>::type>
Choose a placeholder for missing values.
Assorted helper functions for parsing and validation.
Definition choose_missing_placeholder.hpp:15
FloatExtremes find_float_extremes(Iterator start, Iterator end, Mask mask, bool skip_nan)
Definition find_extremes.hpp:144
IntegerExtremes find_integer_extremes(Iterator start, Iterator end, Mask mask)
Definition find_extremes.hpp:53
Extremes for float types.
Definition find_extremes.hpp:88
bool has_lowest
Definition find_extremes.hpp:108
bool has_highest
Definition find_extremes.hpp:114
bool has_nan
Definition find_extremes.hpp:92
bool has_positive_inf
Definition find_extremes.hpp:97
bool has_negative_inf
Definition find_extremes.hpp:102
bool has_zero
Definition find_extremes.hpp:119
Extremes for integer types.
Definition find_extremes.hpp:17
bool has_lowest
Definition find_extremes.hpp:21
bool has_highest
Definition find_extremes.hpp:26
bool has_zero
Definition find_extremes.hpp:31