3774. <flat_set> should include <compare>

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

Priority: Not Prioritized

View all issues with C++23 status.

Discussion:

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 23.6.10 [flat.set.syn] as indicated:

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