Skip to content

Commit 4e7321d

Browse files
committed
Backport tweaks from 2.x.y
1 parent 5022479 commit 4e7321d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

docs/Sorter-adapters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ constexpr auto sort = sorter{};
1717
constexpr auto sort = indirect_adapter(quick_sort);
1818
```
1919

20-
Most of the library's *sorter adapters* can store the passed *sorters* in their internals, allowing them to use adapt *stateful sorters*. Unless explicitly mentioned otherwise in an adapter's description, it is safe to assume that the *sorter adapters* in the library have the following properties:
20+
Most of the library's *sorter adapters* can store the passed *sorters* in their internals, allowing them to adapt *stateful sorters*. Unless explicitly mentioned otherwise in an adapter's description, it is safe to assume that the *sorter adapters* in the library have the following properties:
2121
* The *sorter adapter* stores a copy of every passed sorters in its internals and uses those copy when needed. If every *original sorter* is empty and default-constructible, then the *sorter adapter* is also empty and default-constructible.
2222
* If the *sorter adapter* adapts a single *sorter*, then it has a member function called `get()` which returns a reference to the internal *sorter* whose reference and `const` qualifications match those of the *sorter adapter* instance. If the *sorter adapter* is empty and default-constructible, then a default-constructed instance of the type of the *original sorter* is returned instead.
2323
* If the *sorter adapter* is empty and default-constructible, then it can be converted to any function pointer whose signature matches that of its `operator()`.

tests/adapters/every_adapter_stateful_sorter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2022 Morwenn
2+
* Copyright (c) 2019-2024 Morwenn
33
* SPDX-License-Identifier: MIT
44
*/
55
#include <algorithm>
@@ -12,7 +12,6 @@
1212
#include <vector>
1313
#include <catch2/catch_test_macros.hpp>
1414
#include <cpp-sort/adapters.h>
15-
#include <cpp-sort/fixed_sorters.h>
1615
#include <cpp-sort/sorters/quick_merge_sorter.h>
1716
#include <testing-tools/distributions.h>
1817

0 commit comments

Comments
 (0)