...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::algorithm::clamp_range
// In header: <boost/algorithm/clamp.hpp> template<typename InputIterator, typename OutputIterator, typename Pred> OutputIterator clamp_range(InputIterator first, InputIterator last, OutputIterator out, typename std::iterator_traits< InputIterator >::value_type lo, typename std::iterator_traits< InputIterator >::value_type hi, Pred p);
Parameters: |
|
||||||||||||
Returns: |
clamp the sequence of values [first, last) into [ lo, hi ] using the comparison predicate p. |