This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

3804. flat_foo missing some allocator-extended deduction guides

Section: 23.6.8 [flat.map], 23.6.9 [flat.multimap], 23.6.11 [flat.set], 23.6.12 [flat.multiset] Status: New Submitter: Arthur O'Dwyer Opened: 2022-10-25 Last modified: 2022-11-04

Priority: 2

View other active issues in [flat.map].

View all other issues in [flat.map].

View all issues with New status.

Discussion:

Tony Table:

std::vector<int> v;
std::flat_set s = std::flat_set(v, MyAllocator<int>());
std::flat_set s = std::flat_set(v, std::less(), MyAllocator<int>());
std::flat_set s = std::flat_set(v.begin(), v.end(), MyAllocator<int>());
std::flat_set s = std::flat_set(v.begin(), v.end(), std::less(), MyAllocator<int>());
// BEFORE: all fail to compile
// AFTER: all compile successfully

Contrast 23.6.11.3 [flat.set.cons] with 23.6.4.2 [priqueue.cons], where most of these are okay:

std::vector<int, MyAllocator<int>> v;
std::priority_queue pq1 = std::priority_queue(v, std::less(), MyAllocator<int>());
std::priority_queue pq2 = std::priority_queue(v.begin(), v.end(), MyAllocator<int>());
std::priority_queue pq3 = std::priority_queue(v.begin(), v.end(), std::less(), MyAllocator<int>());
// BEFORE AND AFTER: pq1 compiles successfully
// BEFORE AND AFTER: pq2 and pq3 also compile successfully thanks to LWG 3506(i)

[2022-11-04; Reflector poll]

Set priority to 2 after reflector poll.

Proposed resolution: