|
@ -29,7 +29,7 @@ namespace gp { |
|
|
} |
|
|
} |
|
|
return false; |
|
|
return false; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
template<typename it_t, typename pred> |
|
|
template<typename it_t, typename pred> |
|
|
void quick_sort(it_t first, it_t last, pred predicate = pred{}) { |
|
|
void quick_sort(it_t first, it_t last, pred predicate = pred{}) { |
|
|
using __details::sort2; |
|
|
using __details::sort2; |
|
@ -45,7 +45,7 @@ namespace gp { |
|
|
gp::__details::quick_sort(first, pivot, predicate); |
|
|
gp::__details::quick_sort(first, pivot, predicate); |
|
|
gp::__details::quick_sort(pivot, last, predicate); |
|
|
gp::__details::quick_sort(pivot, last, predicate); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
template<typename it_t, typename pred> |
|
|
template<typename it_t, typename pred> |
|
|
void bubble_sort(it_t first, it_t last, pred predicate = pred{}) { |
|
|
void bubble_sort(it_t first, it_t last, pred predicate = pred{}) { |
|
|
if(last - first <= 2) { |
|
|
if(last - first <= 2) { |
|
|