Skip to content

Commit 13e1939

Browse files
committed
Remove documentation and macros obsoleted by C++17
1 parent fbf74f5 commit 13e1939

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

docs/Changelog.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,6 @@ While **cpp-sort** theoretically requires a fully C++17-compliant compiler, a fe
77
**Performance improvements:**
88
* Sized deallocation: this C++14 feature is not always available (Clang requires `-fsized-deallocation` for example) and standard allocation functions typically don't take advantage of it. However, if `__cpp_sized_deallocation` is defined and the global deallocations functions are replaced with overloads that take advantage of sized deallocation, then several sorters will explicitly try to take advantage of it.
99

10-
## C++17 features
11-
12-
When compiled with C++17, **cpp-sort** might gain a few additional features depending on the level of C++17 support provided by the compiler. The availability of most of the features depends on the presence of corresponding [feature-testing macros][feature-test-macros]. The support for feature-testing macros being optional in C++17, it is possible that some of the features listed below aren't available even though the compiler is implements them. If it is the case and it is a problem for you, don't hesitate to open an issue so that we can explicitly support the given compiler.
13-
14-
**New features:**
15-
* Sorter adapters have been updated to take advantage of deduction guides:
16-
17-
```cpp
18-
// C++14
19-
constexpr auto sort = schwartz_adapter<quick_sorter>{};
20-
// C++17
21-
constexpr auto sort = schwartz_adapter(quick_sort);
22-
```
23-
24-
This notably makes measures of presortedness more usable with the few sorter adapters that make sense for them:
25-
26-
```cpp
27-
// C++14
28-
auto rem = indirect_adapter<decltype(probe::rem)>{};
29-
// C++17
30-
auto rem = indirect_adapter(probe::rem);
31-
```
32-
33-
There is no specific check for this feature: the sorter adpater constructors have been written in such a way that implicit deduction guides work out-of-the-box.
34-
35-
* [`sorter_facade`][sorter-facade] range overloads can now be used in `constexpr` functions.
36-
37-
There is no specific feature macro available to test this, it starts working when `std::begin` and `std::end` are `constexpr`.
38-
3910
## C++20 features
4011

4112
When compiled with C++20, **cpp-sort** might gain a few additional features depending on the level of C++20 support provided by the compiler. The availability of those features depends on the presence of corresponding [feature-testing macros][feature-test-macros] when possible, even though some checks are more granular. Don't hesitate to open an issue if your compiler and standard library supports one of those features but it doesn't seem to work in **cpp-sort**.

include/cpp-sort/detail/config.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@
1616
# include <version>
1717
#endif
1818

19-
////////////////////////////////////////////////////////////
20-
// Check for __has_* macros
21-
22-
#ifndef __has_include
23-
# define __has_include(x) 0
24-
#endif
25-
26-
#ifndef __has_cpp_attribute
27-
# define __has_cpp_attribute(x) 0
28-
#endif
29-
3019
////////////////////////////////////////////////////////////
3120
// Check for C++20 features
3221

0 commit comments

Comments
 (0)