4namespace CXXIter::util {
10 struct SaturatingArithmetic {
12 SaturatingArithmetic(T value) : value(value) {}
13 T get()
const {
return value; }
15 SaturatingArithmetic<T> operator+(T o) {
17 res |= -(res < value);
20 SaturatingArithmetic<T> operator-(T o) {
22 res &= -(res <= value);
25 SaturatingArithmetic<T> operator/(T o) {