forked from boostorg/range
Boost.Range brought back some of the const overloads that were over-zealously removed.
[SVN r61495]
This commit is contained in:
@ -35,6 +35,15 @@ stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
|
||||
return std::stable_partition(boost::begin(rng), boost::end(rng), pred);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class BidirectionalRange, class UnaryPredicate>
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<const BidirectionalRange>::type
|
||||
stable_partition(const BidirectionalRange& rng, UnaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
|
||||
return std::stable_partition(boost::begin(rng),boost::end(rng),pred);
|
||||
}
|
||||
|
||||
// range_return overloads
|
||||
template<range_return_value re, class BidirectionalRange, class UnaryPredicate>
|
||||
inline BOOST_DEDUCED_TYPENAME range_return<BidirectionalRange,re>::type
|
||||
@ -46,6 +55,17 @@ stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
|
||||
rng);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<range_return_value re, class BidirectionalRange, class UnaryPredicate>
|
||||
inline BOOST_DEDUCED_TYPENAME range_return<const BidirectionalRange,re>::type
|
||||
stable_partition(const BidirectionalRange& rng, UnaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
|
||||
return range_return<const BidirectionalRange,re>::pack(
|
||||
std::stable_partition(boost::begin(rng),boost::end(rng),pred),
|
||||
rng);
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::stable_partition;
|
||||
} // namespace boost
|
||||
|
Reference in New Issue
Block a user