Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
clamp.hpp File Reference

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>
Include dependency graph for clamp.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)
 

Detailed Description

Clamp algorithm.

Author
Marshall Clow

Suggested by olafvdspek in https://svn.boost.org/trac/boost/ticket/3215