Opened 6 months ago
Last modified 6 months ago
#829 new enhancement
C++20
Reported by: | Olly Betts | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | Build system | Version: | git master |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description (last modified by )
Ticket to note things we can take advantage of once we require C++20:
- Heterogeneous comparison lookup for unordered containers -
std::unordered_set
, etc.StemStopper::stop_words
,TermListGroup::termfreq
/TermListGroup::get_termfreq
,PointType::contains
/PointType::get_weight
. (We get this for ordered containers in C++14.)
Change History (2)
comment:1 by , 6 months ago
Component: | Other → Build system |
---|---|
Description: | modified (diff) |
Milestone: | → 1.5.0 |
Version: | → git master |
comment:2 by , 6 months ago
Milestone: | 1.5.0 → 2.0.0 |
---|
We can then probe for C++20 in configure and enable if supported by the compiler, with a fallback to C++17.
d3778ed6718d5f638c362e35354947955b78cb52 adds a probe for C++23 with fallback to C++20 then C++17.
We conditionally check for __cpp_lib_associative_heterogeneous_erasure
(C++23) currently (also __cpp_lib_associative_heterogeneous_insertion
but that's due for C++26). Further such conditionalised uses aren't ABI changing so don't need to block starting a new release series.
Note:
See TracTickets
for help on using tickets.
At least for stuff like the above and where the difference isn't exposed in the API headers, we can probably use the
__cpp_
-prefixed feature macros to opportunistically use the new way with a fall-back to creating a temporarystd::string
. We can then probe for C++20 in configure and enable if supported by the compiler, with a fallback to C++17.