Boost.Range removed redundant overloads, increased compiler support, and made return types consistent.

[SVN r61281]
This commit is contained in:
Neil Groves
2010-04-14 22:16:11 +00:00
parent 22fcae4fcb
commit cf63ba0dc9
32 changed files with 37 additions and 821 deletions

View File

@ -35,16 +35,6 @@ inline RandomAccessRange& nth_element(RandomAccessRange& rng,
return rng;
}
/// \overload
template<class RandomAccessRange>
inline const RandomAccessRange& nth_element(const RandomAccessRange& rng,
BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth)
{
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
std::nth_element(boost::begin(rng),nth,boost::end(rng));
return rng;
}
/// \overload
template<class RandomAccessRange, class BinaryPredicate>
inline RandomAccessRange& nth_element(RandomAccessRange& rng,
@ -56,17 +46,6 @@ inline RandomAccessRange& nth_element(RandomAccessRange& rng,
return rng;
}
/// \overload
template<class RandomAccessRange, class BinaryPredicate>
inline const RandomAccessRange& nth_element(const RandomAccessRange& rng,
BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth,
BinaryPredicate sort_pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
std::nth_element(boost::begin(rng),nth,boost::end(rng), sort_pred);
return rng;
}
} // namespace range
using range::nth_element;
} // namespace boost