Boost.Range brought back some of the const overloads that were over-zealously removed.

[SVN r61495]
This commit is contained in:
Neil Groves
2010-04-22 22:43:57 +00:00
parent 1dea353fa3
commit adc4b5db3b
16 changed files with 552 additions and 22 deletions

View File

@ -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