mirror of
https://github.com/boostorg/container.git
synced 2026-07-05 13:30:45 +02:00
Use generic category for fallback implementations
This commit is contained in:
@@ -54,8 +54,8 @@ OutIter partition_scan(FwdIt first, Sent last, OutIter result, Pred pred, non_se
|
||||
// Bidirectional (Hoare-style) partition
|
||||
//////////////////////////////////////////////
|
||||
|
||||
template <class BidirIt, class Pred>
|
||||
BidirIt partition_scan(BidirIt first, BidirIt last, Pred pred, non_segmented_iterator_tag, const std::bidirectional_iterator_tag&)
|
||||
template <class BidirIt, class Pred, class Cat>
|
||||
BidirIt partition_scan(BidirIt first, BidirIt last, Pred pred, non_segmented_iterator_tag, const Cat&)
|
||||
{
|
||||
while(true) {
|
||||
bool cond = true;
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace container {
|
||||
namespace detail_algo {
|
||||
|
||||
//Same-segment reverse: simply a reverse loop with move-swaps. No segmentation
|
||||
template <class BidirIt>
|
||||
void segmented_reverse_dispatch(BidirIt first, BidirIt last, non_segmented_iterator_tag, const std::bidirectional_iterator_tag &)
|
||||
template <class BidirIt, class Cat>
|
||||
void segmented_reverse_dispatch(BidirIt first, BidirIt last, non_segmented_iterator_tag, const Cat &)
|
||||
{
|
||||
while(first != last && first != --last) {
|
||||
boost::adl_move_swap(*first, *last);
|
||||
@@ -79,9 +79,9 @@ void segmented_reverse_dispatch(RAIter first, RAIter last, non_segmented_iterato
|
||||
// At least one side is fully consumed on return.
|
||||
//////////////////////////////////////////////
|
||||
|
||||
template <class It>
|
||||
template <class It, class Cat>
|
||||
void segmented_reverse_disjoint_ranges
|
||||
(It& f_out, It const f_end, It const l_beg, It& l_out, non_segmented_iterator_tag, const std::bidirectional_iterator_tag &)
|
||||
(It& f_out, It const f_end, It const l_beg, It& l_out, non_segmented_iterator_tag, const Cat &)
|
||||
{
|
||||
It f = f_out;
|
||||
It l = l_out;
|
||||
|
||||
@@ -31,9 +31,9 @@ OutIter segmented_reverse_copy(BidirIter first, BidirIter last, OutIter result);
|
||||
|
||||
namespace detail_algo {
|
||||
|
||||
template <class BidirIter, class OutIter>
|
||||
template <class BidirIter, class OutIter, class Cat>
|
||||
OutIter segmented_reverse_copy_dispatch
|
||||
(BidirIter first, BidirIter last, OutIter result, non_segmented_iterator_tag, const std::bidirectional_iterator_tag &)
|
||||
(BidirIter first, BidirIter last, OutIter result, non_segmented_iterator_tag, const Cat &)
|
||||
{
|
||||
while(first != last) {
|
||||
--last;
|
||||
|
||||
Reference in New Issue
Block a user