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:
@ -33,6 +33,14 @@ inline bool next_permutation(BidirectionalRange& rng)
|
||||
return std::next_permutation(boost::begin(rng), boost::end(rng));
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class BidirectionalRange>
|
||||
inline bool next_permutation(const BidirectionalRange& rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
|
||||
return std::next_permutation(boost::begin(rng), boost::end(rng));
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class BidirectionalRange, class Compare>
|
||||
inline bool next_permutation(BidirectionalRange& rng, Compare comp_pred)
|
||||
@ -42,6 +50,16 @@ inline bool next_permutation(BidirectionalRange& rng, Compare comp_pred)
|
||||
comp_pred);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class BidirectionalRange, class Compare>
|
||||
inline bool next_permutation(const BidirectionalRange& rng,
|
||||
Compare comp_pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
|
||||
return std::next_permutation(boost::begin(rng), boost::end(rng),
|
||||
comp_pred);
|
||||
}
|
||||
|
||||
/// \brief template function prev_permutation
|
||||
///
|
||||
/// range-based version of the prev_permutation std algorithm
|
||||
@ -55,6 +73,14 @@ inline bool prev_permutation(BidirectionalRange& rng)
|
||||
return std::prev_permutation(boost::begin(rng), boost::end(rng));
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class BidirectionalRange>
|
||||
inline bool prev_permutation(const BidirectionalRange& rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
|
||||
return std::prev_permutation(boost::begin(rng), boost::end(rng));
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class BidirectionalRange, class Compare>
|
||||
inline bool prev_permutation(BidirectionalRange& rng, Compare comp_pred)
|
||||
@ -64,6 +90,16 @@ inline bool prev_permutation(BidirectionalRange& rng, Compare comp_pred)
|
||||
comp_pred);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class BidirectionalRange, class Compare>
|
||||
inline bool prev_permutation(const BidirectionalRange& rng,
|
||||
Compare comp_pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
|
||||
return std::prev_permutation(boost::begin(rng), boost::end(rng),
|
||||
comp_pred);
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::next_permutation;
|
||||
using range::prev_permutation;
|
||||
|
Reference in New Issue
Block a user