3774. <flat_set> should include <compare>

Section: 24.6.5 [flat.set.syn] Status: C++23 Submitter: Jiang An Opened: 2022-09-12 Last modified: 2023-11-22 15:47:43 UTC

Priority: Not Prioritized

View all issues with C++23 status.


This was originally editorial PR #5789 which is considered not-editorial.

std::flat_set and std::flat_multiset have operator<=> so <compare> should be included in the corresponding header, in the spirit of LWG 3330. #include <compare> is also missing in the adopted paper P1222R4.

[2022-09-23; Reflector poll]

Set status to Tentatively Ready after eight votes in favour during reflector poll.

[2022-11-12 Approved at November 2022 meeting in Kona. Status changed: Voting → WP.]

Proposed resolution:

This wording is relative to N4917.

  1. Modify the synopsis in 24.6.5 [flat.set.syn] as indicated:

    #include <compare>              // see 17.11.1 [compare.syn]
    #include <initializer_list>     // see 17.10.2 [initializer.list.syn]