[Xapian-tickets] [Xapian] #829: C++20

Xapian nobody at xapian.org
Fri May 17 23:17:55 BST 2024


#829: C++20
--------------------------+-------------------------------
 Reporter:  Olly Betts    |             Owner:  Olly Betts
     Type:  enhancement   |            Status:  new
 Priority:  normal        |         Milestone:  1.5.0
Component:  Build system  |           Version:  git master
 Severity:  normal        |        Resolution:
 Keywords:                |        Blocked By:
 Blocking:                |  Operating System:  All
--------------------------+-------------------------------
Changes (by Olly Betts):

 * version:   => git master
 * component:  Other => Build system
 * milestone:   => 1.5.0


Old description:

> Ticket to note things we can take advantage of once we require C++20:
>
> * Heterogeneous comparison lookup for unordered containers -
> `std::unordered_set`, etc.  (We get this for ordered containers in
> C++14.)

New description:

 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.)

--
Comment:

 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 temporary `std::string`.  We can then probe for C++20 in
 configure and enable if supported by the compiler, with a fallback to
 C++17.
-- 
Ticket URL: <https://trac.xapian.org/ticket/829#comment:1>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list