-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
P0429R9 <flat_map>
#2910
Comments
Hi, can I work on this? |
I read through the docs and started to work on this on my branch duanqn/STL:duanqn/flat_map. It is far from complete and I need more time to work on the implementation (and probably need help / reviews from experts later). Looks like it's going to be different from the boost implementation as the standard requires |
Sure, I'll move this to Investigating as you're looking into it. |
Some thoughts on implementation details. For iterator types:
For nested classes:
|
Thanks @frederick-vs-ja for sharing her/his/their insights. I briefly read the implementation of
If there is anything wrong or anything I missed, please point it out, thanks~ |
Also, I have implemented the constructors as written in P0429R9, but I am curious why the constructors are written as Also the constructor |
Hmm... I believe Edit: I've filed LWG-3966 for this. I think |
Returning |
I suspect LWG thought it wasn't worth the bother to make this constructor's specification more complicated given that container moves are generally cheap enough that the extra move construction has no noticeable impact.
If the arguments are lvalues, yes, they'll be copied when passed by value. If the user wants to avoid copies, they can use rvalue arguments. In any case, that all happens in the caller so it's not our problem. |
Hi @StephanTLavavej , is it possible for you to make a collaboration branch for flat_map too? I feel that I may not be able to spend a lot of time testing the current implementation, and I shouldn't block the progress of the entire STL on this. |
@duanqn Done! You can create an initial PR for it when you're ready. |
Thanks! And also thanks for merging my PR :) |
P0429R9
<flat_map>
LWG-3786 Flat maps' deduction guides need to default
Allocator
to be usefulLWG-3803
flat_
meow
constructors takingKeyContainer
lackKeyCompare
parameterLWG-3816
flat_map
andflat_multimap
should impose sequence container requirementsLWG-3884
flat_
meow
is missing allocator-extended copy/move constructorsLWG-3987 Including
<flat_meow>
doesn't providestd::begin/end
Feature-test macro:
Internal VS-PR-420058 has taught the IDE about this new extensionless header - thanks @CaseyCarter!
The text was updated successfully, but these errors were encountered: