@ -90,10 +90,10 @@ using ContainerPointerType =
// lookup of std::begin and std::end, i.e.
// lookup of std::begin and std::end, i.e.
// using std::begin;
// using std::begin;
// using std::end;
// using std::end;
// std::foo(begin(c), end(c)) ;
// std::foo(begin(c), end(c);
// becomes
// becomes
// std::foo(container_algorithm_internal::begin(c),
// std::foo(container_algorithm_internal::begin(c),
// container_algorithm_internal::end(c));
// container_algorithm_internal::end(c));
// These are meant for internal use only.
// These are meant for internal use only.
template < typename C >
template < typename C >
@ -166,7 +166,7 @@ container_algorithm_internal::ContainerDifferenceType<const C> c_distance(
// c_all_of()
// c_all_of()
//
//
// Container-based version of the <algorithm> `std::all_of()` function to
// Container-based version of the <algorithm> `std::all_of()` function to
// test if all elements within a container satisfy a condition .
// test a condition on all elements within a container .
template < typename C , typename Pred >
template < typename C , typename Pred >
bool c_all_of ( const C & c , Pred & & pred ) {
bool c_all_of ( const C & c , Pred & & pred ) {
return std : : all_of ( container_algorithm_internal : : c_begin ( c ) ,
return std : : all_of ( container_algorithm_internal : : c_begin ( c ) ,
@ -188,7 +188,7 @@ bool c_any_of(const C& c, Pred&& pred) {
// c_none_of()
// c_none_of()
//
//
// Container-based version of the <algorithm> `std::none_of()` function to
// Container-based version of the <algorithm> `std::none_of()` function to
// test if no elements in a container fulfill a condition.
// test if no elements in a container fulfil a condition.
template < typename C , typename Pred >
template < typename C , typename Pred >
bool c_none_of ( const C & c , Pred & & pred ) {
bool c_none_of ( const C & c , Pred & & pred ) {
return std : : none_of ( container_algorithm_internal : : c_begin ( c ) ,
return std : : none_of ( container_algorithm_internal : : c_begin ( c ) ,
@ -905,11 +905,11 @@ void c_sort(C& c) {
// Overload of c_sort() for performing a `comp` comparison other than the
// Overload of c_sort() for performing a `comp` comparison other than the
// default `operator<`.
// default `operator<`.
template < typename C , typename LessThan >
template < typename C , typename Compare >
void c_sort ( C & c , LessThan & & comp ) {
void c_sort ( C & c , Compare & & comp ) {
std : : sort ( container_algorithm_internal : : c_begin ( c ) ,
std : : sort ( container_algorithm_internal : : c_begin ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_stable_sort()
// c_stable_sort()
@ -925,11 +925,11 @@ void c_stable_sort(C& c) {
// Overload of c_stable_sort() for performing a `comp` comparison other than the
// Overload of c_stable_sort() for performing a `comp` comparison other than the
// default `operator<`.
// default `operator<`.
template < typename C , typename LessThan >
template < typename C , typename Compare >
void c_stable_sort ( C & c , LessThan & & comp ) {
void c_stable_sort ( C & c , Compare & & comp ) {
std : : stable_sort ( container_algorithm_internal : : c_begin ( c ) ,
std : : stable_sort ( container_algorithm_internal : : c_begin ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_is_sorted()
// c_is_sorted()
@ -944,11 +944,11 @@ bool c_is_sorted(const C& c) {
// c_is_sorted() overload for performing a `comp` comparison other than the
// c_is_sorted() overload for performing a `comp` comparison other than the
// default `operator<`.
// default `operator<`.
template < typename C , typename LessThan >
template < typename C , typename Compare >
bool c_is_sorted ( const C & c , LessThan & & comp ) {
bool c_is_sorted ( const C & c , Compare & & comp ) {
return std : : is_sorted ( container_algorithm_internal : : c_begin ( c ) ,
return std : : is_sorted ( container_algorithm_internal : : c_begin ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_partial_sort()
// c_partial_sort()
@ -966,14 +966,14 @@ void c_partial_sort(
// Overload of c_partial_sort() for performing a `comp` comparison other than
// Overload of c_partial_sort() for performing a `comp` comparison other than
// the default `operator<`.
// the default `operator<`.
template < typename RandomAccessContainer , typename LessThan >
template < typename RandomAccessContainer , typename Compare >
void c_partial_sort (
void c_partial_sort (
RandomAccessContainer & sequence ,
RandomAccessContainer & sequence ,
container_algorithm_internal : : ContainerIter < RandomAccessContainer > middle ,
container_algorithm_internal : : ContainerIter < RandomAccessContainer > middle ,
LessThan & & comp ) {
Compare & & comp ) {
std : : partial_sort ( container_algorithm_internal : : c_begin ( sequence ) , middle ,
std : : partial_sort ( container_algorithm_internal : : c_begin ( sequence ) , middle ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_partial_sort_copy()
// c_partial_sort_copy()
@ -994,15 +994,15 @@ c_partial_sort_copy(const C& sequence, RandomAccessContainer& result) {
// Overload of c_partial_sort_copy() for performing a `comp` comparison other
// Overload of c_partial_sort_copy() for performing a `comp` comparison other
// than the default `operator<`.
// than the default `operator<`.
template < typename C , typename RandomAccessContainer , typename LessThan >
template < typename C , typename RandomAccessContainer , typename Compare >
container_algorithm_internal : : ContainerIter < RandomAccessContainer >
container_algorithm_internal : : ContainerIter < RandomAccessContainer >
c_partial_sort_copy ( const C & sequence , RandomAccessContainer & result ,
c_partial_sort_copy ( const C & sequence , RandomAccessContainer & result ,
LessThan & & comp ) {
Compare & & comp ) {
return std : : partial_sort_copy ( container_algorithm_internal : : c_begin ( sequence ) ,
return std : : partial_sort_copy ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_begin ( result ) ,
container_algorithm_internal : : c_begin ( result ) ,
container_algorithm_internal : : c_end ( result ) ,
container_algorithm_internal : : c_end ( result ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_is_sorted_until()
// c_is_sorted_until()
@ -1018,12 +1018,12 @@ container_algorithm_internal::ContainerIter<C> c_is_sorted_until(C& c) {
// Overload of c_is_sorted_until() for performing a `comp` comparison other than
// Overload of c_is_sorted_until() for performing a `comp` comparison other than
// the default `operator<`.
// the default `operator<`.
template < typename C , typename LessThan >
template < typename C , typename Compare >
container_algorithm_internal : : ContainerIter < C > c_is_sorted_until (
container_algorithm_internal : : ContainerIter < C > c_is_sorted_until (
C & c , LessThan & & comp ) {
C & c , Compare & & comp ) {
return std : : is_sorted_until ( container_algorithm_internal : : c_begin ( c ) ,
return std : : is_sorted_until ( container_algorithm_internal : : c_begin ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_nth_element()
// c_nth_element()
@ -1043,14 +1043,14 @@ void c_nth_element(
// Overload of c_nth_element() for performing a `comp` comparison other than
// Overload of c_nth_element() for performing a `comp` comparison other than
// the default `operator<`.
// the default `operator<`.
template < typename RandomAccessContainer , typename LessThan >
template < typename RandomAccessContainer , typename Compare >
void c_nth_element (
void c_nth_element (
RandomAccessContainer & sequence ,
RandomAccessContainer & sequence ,
container_algorithm_internal : : ContainerIter < RandomAccessContainer > nth ,
container_algorithm_internal : : ContainerIter < RandomAccessContainer > nth ,
LessThan & & comp ) {
Compare & & comp ) {
std : : nth_element ( container_algorithm_internal : : c_begin ( sequence ) , nth ,
std : : nth_element ( container_algorithm_internal : : c_begin ( sequence ) , nth ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
@ -1072,12 +1072,12 @@ container_algorithm_internal::ContainerIter<Sequence> c_lower_bound(
// Overload of c_lower_bound() for performing a `comp` comparison other than
// Overload of c_lower_bound() for performing a `comp` comparison other than
// the default `operator<`.
// the default `operator<`.
template < typename Sequence , typename T , typename LessThan >
template < typename Sequence , typename T , typename Compare >
container_algorithm_internal : : ContainerIter < Sequence > c_lower_bound (
container_algorithm_internal : : ContainerIter < Sequence > c_lower_bound (
Sequence & sequence , T & & value , LessThan & & comp ) {
Sequence & sequence , T & & value , Compare & & comp ) {
return std : : lower_bound ( container_algorithm_internal : : c_begin ( sequence ) ,
return std : : lower_bound ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < T > ( value ) , std : : forward < LessThan > ( comp ) ) ;
std : : forward < T > ( value ) , std : : forward < Compare > ( comp ) ) ;
}
}
// c_upper_bound()
// c_upper_bound()
@ -1095,12 +1095,12 @@ container_algorithm_internal::ContainerIter<Sequence> c_upper_bound(
// Overload of c_upper_bound() for performing a `comp` comparison other than
// Overload of c_upper_bound() for performing a `comp` comparison other than
// the default `operator<`.
// the default `operator<`.
template < typename Sequence , typename T , typename LessThan >
template < typename Sequence , typename T , typename Compare >
container_algorithm_internal : : ContainerIter < Sequence > c_upper_bound (
container_algorithm_internal : : ContainerIter < Sequence > c_upper_bound (
Sequence & sequence , T & & value , LessThan & & comp ) {
Sequence & sequence , T & & value , Compare & & comp ) {
return std : : upper_bound ( container_algorithm_internal : : c_begin ( sequence ) ,
return std : : upper_bound ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < T > ( value ) , std : : forward < LessThan > ( comp ) ) ;
std : : forward < T > ( value ) , std : : forward < Compare > ( comp ) ) ;
}
}
// c_equal_range()
// c_equal_range()
@ -1118,12 +1118,12 @@ c_equal_range(Sequence& sequence, T&& value) {
// Overload of c_equal_range() for performing a `comp` comparison other than
// Overload of c_equal_range() for performing a `comp` comparison other than
// the default `operator<`.
// the default `operator<`.
template < typename Sequence , typename T , typename LessThan >
template < typename Sequence , typename T , typename Compare >
container_algorithm_internal : : ContainerIterPairType < Sequence , Sequence >
container_algorithm_internal : : ContainerIterPairType < Sequence , Sequence >
c_equal_range ( Sequence & sequence , T & & value , LessThan & & comp ) {
c_equal_range ( Sequence & sequence , T & & value , Compare & & comp ) {
return std : : equal_range ( container_algorithm_internal : : c_begin ( sequence ) ,
return std : : equal_range ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < T > ( value ) , std : : forward < LessThan > ( comp ) ) ;
std : : forward < T > ( value ) , std : : forward < Compare > ( comp ) ) ;
}
}
// c_binary_search()
// c_binary_search()
@ -1140,12 +1140,12 @@ bool c_binary_search(Sequence&& sequence, T&& value) {
// Overload of c_binary_search() for performing a `comp` comparison other than
// Overload of c_binary_search() for performing a `comp` comparison other than
// the default `operator<`.
// the default `operator<`.
template < typename Sequence , typename T , typename LessThan >
template < typename Sequence , typename T , typename Compare >
bool c_binary_search ( Sequence & & sequence , T & & value , LessThan & & comp ) {
bool c_binary_search ( Sequence & & sequence , T & & value , Compare & & comp ) {
return std : : binary_search ( container_algorithm_internal : : c_begin ( sequence ) ,
return std : : binary_search ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < T > ( value ) ,
std : : forward < T > ( value ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
@ -1166,14 +1166,14 @@ OutputIterator c_merge(const C1& c1, const C2& c2, OutputIterator result) {
// Overload of c_merge() for performing a `comp` comparison other than
// Overload of c_merge() for performing a `comp` comparison other than
// the default `operator<`.
// the default `operator<`.
template < typename C1 , typename C2 , typename OutputIterator , typename LessThan >
template < typename C1 , typename C2 , typename OutputIterator , typename Compare >
OutputIterator c_merge ( const C1 & c1 , const C2 & c2 , OutputIterator result ,
OutputIterator c_merge ( const C1 & c1 , const C2 & c2 , OutputIterator result ,
LessThan & & comp ) {
Compare & & comp ) {
return std : : merge ( container_algorithm_internal : : c_begin ( c1 ) ,
return std : : merge ( container_algorithm_internal : : c_begin ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_end ( c2 ) , result ,
container_algorithm_internal : : c_end ( c2 ) , result ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_inplace_merge()
// c_inplace_merge()
@ -1189,13 +1189,13 @@ void c_inplace_merge(C& c,
// Overload of c_inplace_merge() for performing a merge using a `comp` other
// Overload of c_inplace_merge() for performing a merge using a `comp` other
// than `operator<`.
// than `operator<`.
template < typename C , typename LessThan >
template < typename C , typename Compare >
void c_inplace_merge ( C & c ,
void c_inplace_merge ( C & c ,
container_algorithm_internal : : ContainerIter < C > middle ,
container_algorithm_internal : : ContainerIter < C > middle ,
LessThan & & comp ) {
Compare & & comp ) {
std : : inplace_merge ( container_algorithm_internal : : c_begin ( c ) , middle ,
std : : inplace_merge ( container_algorithm_internal : : c_begin ( c ) , middle ,
container_algorithm_internal : : c_end ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_includes()
// c_includes()
@ -1213,13 +1213,13 @@ bool c_includes(const C1& c1, const C2& c2) {
// Overload of c_includes() for performing a merge using a `comp` other than
// Overload of c_includes() for performing a merge using a `comp` other than
// `operator<`.
// `operator<`.
template < typename C1 , typename C2 , typename LessThan >
template < typename C1 , typename C2 , typename Compare >
bool c_includes ( const C1 & c1 , const C2 & c2 , LessThan & & comp ) {
bool c_includes ( const C1 & c1 , const C2 & c2 , Compare & & comp ) {
return std : : includes ( container_algorithm_internal : : c_begin ( c1 ) ,
return std : : includes ( container_algorithm_internal : : c_begin ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_end ( c2 ) ,
container_algorithm_internal : : c_end ( c2 ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_set_union()
// c_set_union()
@ -1243,7 +1243,7 @@ OutputIterator c_set_union(const C1& c1, const C2& c2, OutputIterator output) {
// Overload of c_set_union() for performing a merge using a `comp` other than
// Overload of c_set_union() for performing a merge using a `comp` other than
// `operator<`.
// `operator<`.
template < typename C1 , typename C2 , typename OutputIterator , typename LessThan ,
template < typename C1 , typename C2 , typename OutputIterator , typename Compare ,
typename = typename std : : enable_if <
typename = typename std : : enable_if <
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
void > : : type ,
void > : : type ,
@ -1251,18 +1251,18 @@ template <typename C1, typename C2, typename OutputIterator, typename LessThan,
! container_algorithm_internal : : IsUnorderedContainer < C2 > : : value ,
! container_algorithm_internal : : IsUnorderedContainer < C2 > : : value ,
void > : : type >
void > : : type >
OutputIterator c_set_union ( const C1 & c1 , const C2 & c2 , OutputIterator output ,
OutputIterator c_set_union ( const C1 & c1 , const C2 & c2 , OutputIterator output ,
LessThan & & comp ) {
Compare & & comp ) {
return std : : set_union ( container_algorithm_internal : : c_begin ( c1 ) ,
return std : : set_union ( container_algorithm_internal : : c_begin ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_end ( c2 ) , output ,
container_algorithm_internal : : c_end ( c2 ) , output ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_set_intersection()
// c_set_intersection()
//
//
// Container-based version of the <algorithm> `std::set_intersection()` function
// Container-based version of the <algorithm> `std::set_intersection()` function
// to return an iterator containing the intersection of two sorted containers.
// to return an iterator containing the intersection of two containers.
template < typename C1 , typename C2 , typename OutputIterator ,
template < typename C1 , typename C2 , typename OutputIterator ,
typename = typename std : : enable_if <
typename = typename std : : enable_if <
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
@ -1272,11 +1272,6 @@ template <typename C1, typename C2, typename OutputIterator,
void > : : type >
void > : : type >
OutputIterator c_set_intersection ( const C1 & c1 , const C2 & c2 ,
OutputIterator c_set_intersection ( const C1 & c1 , const C2 & c2 ,
OutputIterator output ) {
OutputIterator output ) {
// In debug builds, ensure that both containers are sorted with respect to the
// default comparator. std::set_intersection requires the containers be sorted
// using operator<.
assert ( absl : : c_is_sorted ( c1 ) ) ;
assert ( absl : : c_is_sorted ( c2 ) ) ;
return std : : set_intersection ( container_algorithm_internal : : c_begin ( c1 ) ,
return std : : set_intersection ( container_algorithm_internal : : c_begin ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
@ -1285,7 +1280,7 @@ OutputIterator c_set_intersection(const C1& c1, const C2& c2,
// Overload of c_set_intersection() for performing a merge using a `comp` other
// Overload of c_set_intersection() for performing a merge using a `comp` other
// than `operator<`.
// than `operator<`.
template < typename C1 , typename C2 , typename OutputIterator , typename LessThan ,
template < typename C1 , typename C2 , typename OutputIterator , typename Compare ,
typename = typename std : : enable_if <
typename = typename std : : enable_if <
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
void > : : type ,
void > : : type ,
@ -1293,17 +1288,12 @@ template <typename C1, typename C2, typename OutputIterator, typename LessThan,
! container_algorithm_internal : : IsUnorderedContainer < C2 > : : value ,
! container_algorithm_internal : : IsUnorderedContainer < C2 > : : value ,
void > : : type >
void > : : type >
OutputIterator c_set_intersection ( const C1 & c1 , const C2 & c2 ,
OutputIterator c_set_intersection ( const C1 & c1 , const C2 & c2 ,
OutputIterator output , LessThan & & comp ) {
OutputIterator output , Compare & & comp ) {
// In debug builds, ensure that both containers are sorted with respect to the
// default comparator. std::set_intersection requires the containers be sorted
// using the same comparator.
assert ( absl : : c_is_sorted ( c1 , comp ) ) ;
assert ( absl : : c_is_sorted ( c2 , comp ) ) ;
return std : : set_intersection ( container_algorithm_internal : : c_begin ( c1 ) ,
return std : : set_intersection ( container_algorithm_internal : : c_begin ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_end ( c2 ) , output ,
container_algorithm_internal : : c_end ( c2 ) , output ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_set_difference()
// c_set_difference()
@ -1328,7 +1318,7 @@ OutputIterator c_set_difference(const C1& c1, const C2& c2,
// Overload of c_set_difference() for performing a merge using a `comp` other
// Overload of c_set_difference() for performing a merge using a `comp` other
// than `operator<`.
// than `operator<`.
template < typename C1 , typename C2 , typename OutputIterator , typename LessThan ,
template < typename C1 , typename C2 , typename OutputIterator , typename Compare ,
typename = typename std : : enable_if <
typename = typename std : : enable_if <
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
void > : : type ,
void > : : type ,
@ -1336,12 +1326,12 @@ template <typename C1, typename C2, typename OutputIterator, typename LessThan,
! container_algorithm_internal : : IsUnorderedContainer < C2 > : : value ,
! container_algorithm_internal : : IsUnorderedContainer < C2 > : : value ,
void > : : type >
void > : : type >
OutputIterator c_set_difference ( const C1 & c1 , const C2 & c2 ,
OutputIterator c_set_difference ( const C1 & c1 , const C2 & c2 ,
OutputIterator output , LessThan & & comp ) {
OutputIterator output , Compare & & comp ) {
return std : : set_difference ( container_algorithm_internal : : c_begin ( c1 ) ,
return std : : set_difference ( container_algorithm_internal : : c_begin ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_end ( c2 ) , output ,
container_algorithm_internal : : c_end ( c2 ) , output ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_set_symmetric_difference()
// c_set_symmetric_difference()
@ -1367,7 +1357,7 @@ OutputIterator c_set_symmetric_difference(const C1& c1, const C2& c2,
// Overload of c_set_symmetric_difference() for performing a merge using a
// Overload of c_set_symmetric_difference() for performing a merge using a
// `comp` other than `operator<`.
// `comp` other than `operator<`.
template < typename C1 , typename C2 , typename OutputIterator , typename LessThan ,
template < typename C1 , typename C2 , typename OutputIterator , typename Compare ,
typename = typename std : : enable_if <
typename = typename std : : enable_if <
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
! container_algorithm_internal : : IsUnorderedContainer < C1 > : : value ,
void > : : type ,
void > : : type ,
@ -1376,13 +1366,13 @@ template <typename C1, typename C2, typename OutputIterator, typename LessThan,
void > : : type >
void > : : type >
OutputIterator c_set_symmetric_difference ( const C1 & c1 , const C2 & c2 ,
OutputIterator c_set_symmetric_difference ( const C1 & c1 , const C2 & c2 ,
OutputIterator output ,
OutputIterator output ,
LessThan & & comp ) {
Compare & & comp ) {
return std : : set_symmetric_difference (
return std : : set_symmetric_difference (
container_algorithm_internal : : c_begin ( c1 ) ,
container_algorithm_internal : : c_begin ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_end ( c1 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_begin ( c2 ) ,
container_algorithm_internal : : c_end ( c2 ) , output ,
container_algorithm_internal : : c_end ( c2 ) , output ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
@ -1401,11 +1391,11 @@ void c_push_heap(RandomAccessContainer& sequence) {
// Overload of c_push_heap() for performing a push operation on a heap using a
// Overload of c_push_heap() for performing a push operation on a heap using a
// `comp` other than `operator<`.
// `comp` other than `operator<`.
template < typename RandomAccessContainer , typename LessThan >
template < typename RandomAccessContainer , typename Compare >
void c_push_heap ( RandomAccessContainer & sequence , LessThan & & comp ) {
void c_push_heap ( RandomAccessContainer & sequence , Compare & & comp ) {
std : : push_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
std : : push_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_pop_heap()
// c_pop_heap()
@ -1420,11 +1410,11 @@ void c_pop_heap(RandomAccessContainer& sequence) {
// Overload of c_pop_heap() for performing a pop operation on a heap using a
// Overload of c_pop_heap() for performing a pop operation on a heap using a
// `comp` other than `operator<`.
// `comp` other than `operator<`.
template < typename RandomAccessContainer , typename LessThan >
template < typename RandomAccessContainer , typename Compare >
void c_pop_heap ( RandomAccessContainer & sequence , LessThan & & comp ) {
void c_pop_heap ( RandomAccessContainer & sequence , Compare & & comp ) {
std : : pop_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
std : : pop_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_make_heap()
// c_make_heap()
@ -1439,11 +1429,11 @@ void c_make_heap(RandomAccessContainer& sequence) {
// Overload of c_make_heap() for performing heap comparisons using a
// Overload of c_make_heap() for performing heap comparisons using a
// `comp` other than `operator<`
// `comp` other than `operator<`
template < typename RandomAccessContainer , typename LessThan >
template < typename RandomAccessContainer , typename Compare >
void c_make_heap ( RandomAccessContainer & sequence , LessThan & & comp ) {
void c_make_heap ( RandomAccessContainer & sequence , Compare & & comp ) {
std : : make_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
std : : make_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_sort_heap()
// c_sort_heap()
@ -1458,11 +1448,11 @@ void c_sort_heap(RandomAccessContainer& sequence) {
// Overload of c_sort_heap() for performing heap comparisons using a
// Overload of c_sort_heap() for performing heap comparisons using a
// `comp` other than `operator<`
// `comp` other than `operator<`
template < typename RandomAccessContainer , typename LessThan >
template < typename RandomAccessContainer , typename Compare >
void c_sort_heap ( RandomAccessContainer & sequence , LessThan & & comp ) {
void c_sort_heap ( RandomAccessContainer & sequence , Compare & & comp ) {
std : : sort_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
std : : sort_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_is_heap()
// c_is_heap()
@ -1477,11 +1467,11 @@ bool c_is_heap(const RandomAccessContainer& sequence) {
// Overload of c_is_heap() for performing heap comparisons using a
// Overload of c_is_heap() for performing heap comparisons using a
// `comp` other than `operator<`
// `comp` other than `operator<`
template < typename RandomAccessContainer , typename LessThan >
template < typename RandomAccessContainer , typename Compare >
bool c_is_heap ( const RandomAccessContainer & sequence , LessThan & & comp ) {
bool c_is_heap ( const RandomAccessContainer & sequence , Compare & & comp ) {
return std : : is_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
return std : : is_heap ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_is_heap_until()
// c_is_heap_until()
@ -1497,12 +1487,12 @@ c_is_heap_until(RandomAccessContainer& sequence) {
// Overload of c_is_heap_until() for performing heap comparisons using a
// Overload of c_is_heap_until() for performing heap comparisons using a
// `comp` other than `operator<`
// `comp` other than `operator<`
template < typename RandomAccessContainer , typename LessThan >
template < typename RandomAccessContainer , typename Compare >
container_algorithm_internal : : ContainerIter < RandomAccessContainer >
container_algorithm_internal : : ContainerIter < RandomAccessContainer >
c_is_heap_until ( RandomAccessContainer & sequence , LessThan & & comp ) {
c_is_heap_until ( RandomAccessContainer & sequence , Compare & & comp ) {
return std : : is_heap_until ( container_algorithm_internal : : c_begin ( sequence ) ,
return std : : is_heap_until ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
@ -1523,12 +1513,12 @@ container_algorithm_internal::ContainerIter<Sequence> c_min_element(
// Overload of c_min_element() for performing a `comp` comparison other than
// Overload of c_min_element() for performing a `comp` comparison other than
// `operator<`.
// `operator<`.
template < typename Sequence , typename LessThan >
template < typename Sequence , typename Compare >
container_algorithm_internal : : ContainerIter < Sequence > c_min_element (
container_algorithm_internal : : ContainerIter < Sequence > c_min_element (
Sequence & sequence , LessThan & & comp ) {
Sequence & sequence , Compare & & comp ) {
return std : : min_element ( container_algorithm_internal : : c_begin ( sequence ) ,
return std : : min_element ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_max_element()
// c_max_element()
@ -1545,12 +1535,12 @@ container_algorithm_internal::ContainerIter<Sequence> c_max_element(
// Overload of c_max_element() for performing a `comp` comparison other than
// Overload of c_max_element() for performing a `comp` comparison other than
// `operator<`.
// `operator<`.
template < typename Sequence , typename LessThan >
template < typename Sequence , typename Compare >
container_algorithm_internal : : ContainerIter < Sequence > c_max_element (
container_algorithm_internal : : ContainerIter < Sequence > c_max_element (
Sequence & sequence , LessThan & & comp ) {
Sequence & sequence , Compare & & comp ) {
return std : : max_element ( container_algorithm_internal : : c_begin ( sequence ) ,
return std : : max_element ( container_algorithm_internal : : c_begin ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
container_algorithm_internal : : c_end ( sequence ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_minmax_element()
// c_minmax_element()
@ -1568,12 +1558,12 @@ c_minmax_element(C& c) {
// Overload of c_minmax_element() for performing `comp` comparisons other than
// Overload of c_minmax_element() for performing `comp` comparisons other than
// `operator<`.
// `operator<`.
template < typename C , typename LessThan >
template < typename C , typename Compare >
container_algorithm_internal : : ContainerIterPairType < C , C >
container_algorithm_internal : : ContainerIterPairType < C , C >
c_minmax_element ( C & c , LessThan & & comp ) {
c_minmax_element ( C & c , Compare & & comp ) {
return std : : minmax_element ( container_algorithm_internal : : c_begin ( c ) ,
return std : : minmax_element ( container_algorithm_internal : : c_begin ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
@ -1598,15 +1588,15 @@ bool c_lexicographical_compare(Sequence1&& sequence1, Sequence2&& sequence2) {
// Overload of c_lexicographical_compare() for performing a lexicographical
// Overload of c_lexicographical_compare() for performing a lexicographical
// comparison using a `comp` operator instead of `operator<`.
// comparison using a `comp` operator instead of `operator<`.
template < typename Sequence1 , typename Sequence2 , typename LessThan >
template < typename Sequence1 , typename Sequence2 , typename Compare >
bool c_lexicographical_compare ( Sequence1 & & sequence1 , Sequence2 & & sequence2 ,
bool c_lexicographical_compare ( Sequence1 & & sequence1 , Sequence2 & & sequence2 ,
LessThan & & comp ) {
Compare & & comp ) {
return std : : lexicographical_compare (
return std : : lexicographical_compare (
container_algorithm_internal : : c_begin ( sequence1 ) ,
container_algorithm_internal : : c_begin ( sequence1 ) ,
container_algorithm_internal : : c_end ( sequence1 ) ,
container_algorithm_internal : : c_end ( sequence1 ) ,
container_algorithm_internal : : c_begin ( sequence2 ) ,
container_algorithm_internal : : c_begin ( sequence2 ) ,
container_algorithm_internal : : c_end ( sequence2 ) ,
container_algorithm_internal : : c_end ( sequence2 ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_next_permutation()
// c_next_permutation()
@ -1622,11 +1612,11 @@ bool c_next_permutation(C& c) {
// Overload of c_next_permutation() for performing a lexicographical
// Overload of c_next_permutation() for performing a lexicographical
// comparison using a `comp` operator instead of `operator<`.
// comparison using a `comp` operator instead of `operator<`.
template < typename C , typename LessThan >
template < typename C , typename Compare >
bool c_next_permutation ( C & c , LessThan & & comp ) {
bool c_next_permutation ( C & c , Compare & & comp ) {
return std : : next_permutation ( container_algorithm_internal : : c_begin ( c ) ,
return std : : next_permutation ( container_algorithm_internal : : c_begin ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
// c_prev_permutation()
// c_prev_permutation()
@ -1642,11 +1632,11 @@ bool c_prev_permutation(C& c) {
// Overload of c_prev_permutation() for performing a lexicographical
// Overload of c_prev_permutation() for performing a lexicographical
// comparison using a `comp` operator instead of `operator<`.
// comparison using a `comp` operator instead of `operator<`.
template < typename C , typename LessThan >
template < typename C , typename Compare >
bool c_prev_permutation ( C & c , LessThan & & comp ) {
bool c_prev_permutation ( C & c , Compare & & comp ) {
return std : : prev_permutation ( container_algorithm_internal : : c_begin ( c ) ,
return std : : prev_permutation ( container_algorithm_internal : : c_begin ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
container_algorithm_internal : : c_end ( c ) ,
std : : forward < LessThan > ( comp ) ) ;
std : : forward < Compare > ( comp ) ) ;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------