forked from boostorg/range
Boost.Range removed redundant overloads, increased compiler support, and made return types consistent.
[SVN r61281]
This commit is contained in:
@ -27,18 +27,10 @@ namespace boost
|
||||
/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
|
||||
/// \pre Compare is a model of the BinaryPredicateConcept
|
||||
template<class RandomAccessRange>
|
||||
inline void push_heap(RandomAccessRange& rng)
|
||||
inline RandomAccessRange& push_heap(RandomAccessRange& rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
|
||||
std::push_heap(boost::begin(rng), boost::end(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;
|
||||
}
|
||||
|
||||
@ -51,15 +43,6 @@ 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
|
||||
@ -74,15 +57,6 @@ 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)
|
||||
@ -92,15 +66,6 @@ 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
|
||||
@ -115,15 +80,6 @@ inline RandomAccessRange& make_heap(RandomAccessRange& rng)
|
||||
return rng;
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class RandomAccessRange>
|
||||
inline 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)
|
||||
@ -133,15 +89,6 @@ 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
|
||||
@ -156,15 +103,6 @@ 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)
|
||||
@ -174,15 +112,6 @@ 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