1 #ifndef _VALWITHEXTREME_HPP 2 #define _VALWITHEXTREME_HPP 14 #include <metaprogramming/SwallowSemicolon.hpp> 75 std::numeric_limits<T>::max();
79 std::numeric_limits<T>::min();
85 template <
typename V=T>
107 #define PROVIDE_UNARY_OPERATOR(OP) 109 template <typename V> 110 ValWithExtreme& operator
OP (const V& oth) 125 #undef PROVIDE_UNARY_OPERATOR 129 template <
typename T>
operator const T &() const
Implicit cast to const value reference.
ValWithExtreme(const V &init)
Constructor.
const T & extreme() const
Retrurn extreme value.
ValWithExtreme & updateExtreme()
Update the extreme.
Extreme
Possible extreme types.
#define PROVIDE_UNARY_OPERATOR(OP)
Provide an unary operator OP.
Class which keeps track of extreme values of a given type.
decltype(auto) operator+(T1 &&smet1, T2 &&smet2)
Implement smet1+smet2.
void reset()
Reset to standard value.
ValWithExtreme()
Default constructor.