Skip to content
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

[WIP] Implementation of <flat_map> #3896

Merged
merged 101 commits into from
Jan 12, 2024

Conversation

duanqn
Copy link
Contributor

@duanqn duanqn commented Jul 21, 2023

Ongoing work -- implementation of #2910 .
Progress so far:

  • P0429R9 <flat_map>
    • flat_map: nested types
    • flat_map: constructors (as specified in P0429R9)
    • flat_map: iterator and const_iterator (iterator is now convertible to const_iterator)
    • flat_map: capacity functions
    • flat_map: iterator functions (begin, end etc.)
    • flat_map: observer functions
    • flat_map: operator == and <=>, non-member swap
    • flat_map: member functions including Access, Modifiers, Erasure and more
    • Deduction guides
    • flat_multimap
  • LWG-3884 flat_meow is missing allocator-extended copy/move constructors
  • LWG-3816 flat_map and flat_multimap should impose sequence container requirements (Note: Pure wording. No code implementation required.)
  • LWG-3786 Flat maps' deduction guides need to default Allocator to be useful
  • LWG-3803 flat_meow constructors taking KeyContainer lack KeyCompare parameter

Copy link
Contributor

@frederick-vs-ja frederick-vs-ja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After all, clang-format needs to run for <flat_map> after changes.

stl/inc/flat_map Outdated
Comment on lines 20 to 21
struct sorted_unique_t { explicit sorted_unique_t() = default; };
inline constexpr sorted_unique_t sorted_unique {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These things should be in <xmemory>. Actually, they are already provided there in the feature/flat_set branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to remove this once the changes of flat_set are visible on master branch

stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
Copy link
Contributor

@AlexGuteniev AlexGuteniev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usual header stuff

stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej added flat_meow C++23 container adaptors cxx23 C++23 feature labels Jul 21, 2023
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/yvals_core.h Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
@duanqn

This comment was marked as outdated.

@duanqn

This comment was marked as outdated.

stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
@duanqn

This comment was marked as outdated.

stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
stl/inc/flat_map Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej changed the base branch from main to feature/flat_map January 12, 2024 05:11
@StephanTLavavej StephanTLavavej marked this pull request as ready for review January 12, 2024 05:11
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner January 12, 2024 05:11
@StephanTLavavej
Copy link
Member

I've changed the "base" branch so this targets the new feature/flat_map (currently at the same commit as main), pushed a conflict-free merge with main, followed by mechanical clang-formatting and fixes to test_header_units_and_modules.hpp so the checks will pass.

I haven't otherwise reviewed the code, but this will be ready to merge as a starting point once the checks are green. Thanks again for all your hard work getting the feature this far! 😻

@StephanTLavavej StephanTLavavej merged commit 8e0f015 into microsoft:feature/flat_map Jan 12, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx23 C++23 feature flat_meow C++23 container adaptors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants