67#define ADS_SORT_FORWARD ADS_ALWAYS_INLINE
85bool contract( F && f );
89template< std::ranges::random_access_range S >
90std::vector< std::ranges::range_value_t< S > >
91auditCopy(
const S & A , std::size_t lo = 0 ,
92 std::size_t hi = std::size_t( -1 ) );
98template< std::ranges::random_access_range S ,
class C >
99bool samePermutation(
const S & A ,
100 std::vector< std::ranges::range_value_t< S > > before ,
101 C less , std::size_t lo = 0 ,
102 std::size_t hi = std::size_t( -1 ) );
108template< std::ranges::random_access_range S ,
class C >
109bool sortedPermutation(
const S & A ,
110 std::vector< std::ranges::range_value_t< S > > before ,
111 C less , std::size_t lo = 0 ,
112 std::size_t hi = std::size_t( -1 ) );
117template<
class S ,
class C >
118bool sequenceSorted(
const S & L , C less );
122template<
class T ,
class C >
123inline constexpr bool naturalOrder =
124 std::is_same_v< C , std::less<> > || std::is_same_v< C , std::less< T > >;
129inline constexpr bool ownRange =
false;
132inline constexpr bool ownRange< std::vector< T > > =
true;
134template<
class T , std::
size_t N >
135inline constexpr bool ownRange< std::span< T , N > > =
true;
138inline constexpr bool ownRange< std::ranges::ref_view< R > > =
true;
145template<
class R ,
class F ,
class G =
void * >
146auto sortRange( R & r , F && f , G && g =
nullptr );
154 std::ranges::random_access_range< R > && std::ranges::sized_range< R > &&
155 std::permutable< std::ranges::iterator_t< R > > &&
156 std::movable< std::ranges::range_value_t< R > > &&
157 ! detail::ownRange< std::remove_cvref_t< R > >;
164inline constexpr bool spanOrVector =
false;
167inline constexpr bool spanOrVector< std::vector< T > > =
true;
170inline constexpr bool spanOrVector< std::span< T > > =
true;
178concept SortStore = detail::spanOrVector< std::remove_cvref_t< S > >;
186 ( std::ranges::random_access_range< std::remove_cvref_t< S > > &&
187 std::ranges::sized_range< std::remove_cvref_t< S > > &&
188 std::ranges::view< std::remove_cvref_t< S > > );
194 std::same_as< std::ranges::range_value_t< std::remove_cvref_t< S > > ,
205#include "ADS/sort/impl/Sorted.tpp"
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The primitives of the processor that the compilers spell each in their own way, in one form for all: ...
the storage on which the sorts of the book work in place, which read the items by their ranks only: a...
Definition Sorted.h:184
a range that the sorts take beside std::vector and std::span: random access, sized,...
Definition Sorted.h:153
the storage on which the sorts work in place, by reference: a std::vector or a std::span of its items...
Definition Sorted.h:178
a SortStore of strings
Definition Sorted.h:192
bool checkingContract(void)
true while a contract of ADS is evaluated: a comparator that counts its calls skips those made by the...