forked from boostorg/range
Boost.Range merge of bug fixes and documentation
[SVN r64120]
This commit is contained in:
@ -34,6 +34,15 @@ inline RandomAccessRange& push_heap(RandomAccessRange& rng)
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange>
|
||||
inline const RandomAccessRange& push_heap(const RandomAccessRange& rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
|
||||
std::push_heap(boost::begin(rng), boost::end(rng));
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange, class Compare>
|
||||
inline RandomAccessRange& push_heap(RandomAccessRange& rng, Compare comp_pred)
|
||||
@ -43,6 +52,15 @@ inline RandomAccessRange& push_heap(RandomAccessRange& rng, Compare comp_pred)
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange, class Compare>
|
||||
inline const RandomAccessRange& push_heap(const RandomAccessRange& rng, Compare comp_pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
|
||||
std::push_heap(boost::begin(rng), boost::end(rng), comp_pred);
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \brief template function pop_heap
|
||||
///
|
||||
/// range-based version of the pop_heap std algorithm
|
||||
@ -57,6 +75,15 @@ inline RandomAccessRange& pop_heap(RandomAccessRange& rng)
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange>
|
||||
inline const RandomAccessRange& pop_heap(const RandomAccessRange& rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
|
||||
std::pop_heap(boost::begin(rng), boost::end(rng));
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange, class Compare>
|
||||
inline RandomAccessRange& pop_heap(RandomAccessRange& rng, Compare comp_pred)
|
||||
@ -66,6 +93,15 @@ inline RandomAccessRange& pop_heap(RandomAccessRange& rng, Compare comp_pred)
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange, class Compare>
|
||||
inline const RandomAccessRange& pop_heap(const RandomAccessRange& rng, Compare comp_pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
|
||||
std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred);
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \brief template function make_heap
|
||||
///
|
||||
/// range-based version of the make_heap std algorithm
|
||||
@ -80,6 +116,15 @@ inline RandomAccessRange& make_heap(RandomAccessRange& rng)
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange>
|
||||
inline const RandomAccessRange& make_heap(const RandomAccessRange& rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
|
||||
std::make_heap(boost::begin(rng), boost::end(rng));
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange, class Compare>
|
||||
inline RandomAccessRange& make_heap(RandomAccessRange& rng, Compare comp_pred)
|
||||
@ -89,6 +134,15 @@ inline RandomAccessRange& make_heap(RandomAccessRange& rng, Compare comp_pred)
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange, class Compare>
|
||||
inline const RandomAccessRange& make_heap(const RandomAccessRange& rng, Compare comp_pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
|
||||
std::make_heap(boost::begin(rng), boost::end(rng), comp_pred);
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \brief template function sort_heap
|
||||
///
|
||||
/// range-based version of the sort_heap std algorithm
|
||||
@ -103,6 +157,15 @@ inline RandomAccessRange& sort_heap(RandomAccessRange& rng)
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange>
|
||||
inline const RandomAccessRange& sort_heap(const RandomAccessRange& rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
|
||||
std::sort_heap(boost::begin(rng), boost::end(rng));
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange, class Compare>
|
||||
inline RandomAccessRange& sort_heap(RandomAccessRange& rng, Compare comp_pred)
|
||||
@ -112,6 +175,15 @@ inline RandomAccessRange& sort_heap(RandomAccessRange& rng, Compare comp_pred)
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange, class Compare>
|
||||
inline const RandomAccessRange& sort_heap(const RandomAccessRange& rng, Compare comp_pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
|
||||
std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred);
|
||||
return rng;
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::push_heap;
|
||||
using range::pop_heap;
|
||||
|
Reference in New Issue
Block a user