8 #ifndef INCLUDED_UHD_UTILS_ALGORITHM_HPP
9 #define INCLUDED_UHD_UTILS_ALGORITHM_HPP
12 #include <boost/range/begin.hpp>
13 #include <boost/range/end.hpp>
35 std::sort(boost::begin(r), boost::end(r));
52 std::reverse(boost::begin(r), boost::end(r));
65 template <
typename Range,
typename T>
68 return boost::end(range) != std::find(boost::begin(range), boost::end(range), value);
78 template <
typename T>
UHD_INLINE T
clip(
const T& val,
const T& bound1,
const T& bound2)
80 const T minimum = std::min(bound1, bound2);
83 const T maximum = std::max(bound1, bound2);