Higher-order Callable Object imbuing saturation semantic onto other Callable Objects.
Synopsis
if saturated(eve::fname) is to be called then
#include <eve/module/core.hpp>
must be included.
Members Functions
auto operator()(eve::callable auto const& f ) const noexcept;
- Parameters
-
f | An instance of eve::callable |
- Returns
- A Callable Object performing the same kind of operation but while taking care of saturating its return value so that it always fit into the input type range.
saturated is currently supported by
- eve::abs,
- eve::add,
- eve::convert,
- eve::dec,
- eve::div,
- eve::inc,
- eve::mul,
- eve::sub,
- eve::oneminus,
- eve::next,
- eve::prev
- eve::sqr.