Created on 2022-10-25.00:00:00 last changed 25 months ago
[ 2022-11-04; Reflector poll ]
Set priority to 2 after reflector poll.
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 [flat.set.cons] with [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
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-04 20:59:04 | admin | set | messages: + msg12923 |
2022-10-25 00:00:00 | admin | create |