You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Sorter-facade.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ The return type `Ret` can either match that of the sorter, or be `void`, in whic
45
45
46
46
Note that the function pointer conversion syntax above is made up, but it allows to clearly highlight what it does while hiding the `typedef`s needed for the syntax to be valid. In these signatures, `Ret` is the [`std::result_of_t`][std-result-of] of the sorter called with the parameters. The actual implementation is more verbose and redundant, but it allows to transform a sorter into a function pointer corresponding to any valid overload of `operator()`.
47
47
48
-
***WARNING:** conversion to function pointers does not work with MSVC ([issue #185][issue-185]).*
48
+
***WARNING:** conversion to function pointers does not work with MSVC ([issue github#185][issue-185]).*
Copy file name to clipboardExpand all lines: docs/Writing-a-bubble_sorter.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -286,7 +286,7 @@ Generic agorithms are good, more generic algorithms are sometimes better. The cu
286
286
287
287
C++20 ranges introduce the notion of ["proxy iterators"][proxy-iterators], which are basically iterators that can't yield a proper reference to the object they point to, but instead yield a proxy object acting as a reference. In order to handle such iterators, C++20 introduces the *customization point objects*[`std::ranges::iter_move`][std-iter-move] and [`std::ranges::iter_swap`][std-iter-swap] which should be used instead of `std::move(*it)` and `std::iter_swap(it1, it2)` in generic algorithms that aim to support proxy iterators.
288
288
289
-
**cpp-sort** being a C++17 library, it can't rely on these CPOs and provides the utility functions [`utility::iter_move` and `utility::iter_swap`][utility-iter-move] to replace them. They are a bit cruder than their standard equivalents: you have to import them into the current namespace and perform an unqualified call, *à la*`std::swap`. Moreover, they are currently not compatible with their C++20 counterparts yet for legacy reasons (see [issue 223][issue-223]).
289
+
**cpp-sort** being a C++17 library, it can't rely on these CPOs and provides the utility functions [`utility::iter_move` and `utility::iter_swap`][utility-iter-move] to replace them. They are a bit cruder than their standard equivalents: you have to import them into the current namespace and perform an unqualified call, *à la*`std::swap`. Moreover, they are currently not compatible with their C++20 counterparts yet for legacy reasons (see [issue github#223][issue-223]).
Copy file name to clipboardExpand all lines: docs/Writing-a-randomizing_adapter.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ When possible, a proper *sorter adapter* is expected to be callable with the sam
72
72
73
73
## Returned value
74
74
75
-
There is currently no strict rule about what a *sorter adapter* should return (this is actually a [open design issue][issue-134]), though the general wisdom is that an adapter should transparently provide as many features as the sorter it adapts when it reasonably can. The idea is that replacing the sorter by its wrapped counterpart should be easy.
75
+
There is no strict rule about what a *sorter adapter* should return. The general wisdom is that an adapter should transparently provide as many features as the *sorter* it adapts when it reasonably can unless it has good reasons to to otherwise. The idea is that replacing the sorter by its wrapped counterpart should be easy.
76
76
77
77
We don't have a specific use for the return channel of `randomizing_adapter` and it is simple to make it transitively return whatever the wrapped sorter returns - and even convenient -, so I decided to do just that.
78
78
@@ -142,7 +142,6 @@ The full implementation can be found in the `examples` folder.
0 commit comments