Clamp algorithm. More...
#include <functional>
#include <iterator>
#include <cassert>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/utility/enable_if.hpp>
Namespaces | |
boost | |
Duration formatting facet for input. | |
boost::algorithm | |
Functions | |
template<typename T , typename Pred > | |
T const & | boost::algorithm::clamp (T const &val, typename boost::mpl::identity< T >::type const &lo, typename boost::mpl::identity< T >::type const &hi, Pred p) |
template<typename T > | |
T const & | boost::algorithm::clamp (const T &val, typename boost::mpl::identity< T >::type const &lo, typename boost::mpl::identity< T >::type const &hi) |
template<typename InputIterator , typename OutputIterator > | |
OutputIterator | boost::algorithm::clamp_range (InputIterator first, InputIterator last, OutputIterator out, typename std::iterator_traits< InputIterator >::value_type const &lo, typename std::iterator_traits< InputIterator >::value_type const &hi) |
template<typename Range , typename OutputIterator > | |
boost::disable_if_c < boost::is_same< Range, OutputIterator >::value, OutputIterator >::type | boost::algorithm::clamp_range (const Range &r, OutputIterator out, typename std::iterator_traits< typename boost::range_iterator< const Range >::type >::value_type const &lo, typename std::iterator_traits< typename boost::range_iterator< const Range >::type >::value_type const &hi) |
template<typename InputIterator , typename OutputIterator , typename Pred > | |
OutputIterator | boost::algorithm::clamp_range (InputIterator first, InputIterator last, OutputIterator out, typename std::iterator_traits< InputIterator >::value_type const &lo, typename std::iterator_traits< InputIterator >::value_type const &hi, Pred p) |
template<typename Range , typename OutputIterator , typename Pred > | |
boost::disable_if_c < boost::is_same< Range, OutputIterator >::value, OutputIterator >::type | boost::algorithm::clamp_range (const Range &r, OutputIterator out, typename std::iterator_traits< typename boost::range_iterator< const Range >::type >::value_type const &lo, typename std::iterator_traits< typename boost::range_iterator< const Range >::type >::value_type const &hi, Pred p) |
Clamp algorithm.
Suggested by olafvdspek in https://svn.boost.org/trac/boost/ticket/3215