Skip to content

Conversation

@onihusube
Copy link
Contributor

@onihusube onihusube requested a review from a team as a code owner September 21, 2020 15:13
@ghost
Copy link

ghost commented Sep 21, 2020

CLA assistant check
All CLA requirements met.

@CaseyCarter CaseyCarter changed the title Implemanet polymorphic_allocator<> (#10) Implement polymorphic_allocator<> Sep 21, 2020
@CaseyCarter CaseyCarter added the cxx20 C++20 feature label Sep 21, 2020
Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Thanks for implementing this feature! 😸 This looks solid; I have a handful of comments but they're all localized and should be straightforward to resolve.

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Adding 2 comments that somehow got lost from the initial review.

onihusube and others added 11 commits September 22, 2020 13:38
Co-authored-by: Stephan T. Lavavej <[email protected]>
* Need `<cstdint>` for `std::intptr_t`.
* Need `<limits>`, not `<numeric>`, for `std::numeric_limits`.
* Need `<new>` for `std::bad_alloc` and `std::bad_array_new_length`.
Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! I pushed a couple of small changes to the test:

  • Use std::uintptr_t for modulo. (Unsigned modulo is easier to reason about; signed modulo was notoriously tricky although [expr.mul] was eventually simplified in C++17 if I recall correctly.)
  • Update include directives:
    • Need <cstdint> for std::uintptr_t.
    • Need <limits>, not <numeric>, for std::numeric_limits.
    • Need <new> for std::bad_alloc and std::bad_array_new_length.

I'll move your PR forward to Final Review - then we'll just need a second STL maintainer to sign off (they tend to be active during Redmond's daytime, unlike me 😹), and then your feature will be ready to merge! 🎉

@SuperWig

This comment has been minimized.

@onihusube

This comment has been minimized.

@SuperWig

This comment has been minimized.

@AdamBucior

This comment has been minimized.

@SuperWig

This comment has been minimized.

@StephanTLavavej StephanTLavavej self-assigned this Sep 23, 2020
Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Looks good; I am not sure why the tests timed out so I'll rerun them.

@StephanTLavavej

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@StephanTLavavej StephanTLavavej removed their assignment Sep 23, 2020
Copy link
Contributor

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

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

This looks Ready to me!

@StephanTLavavej
Copy link
Member

Status update: I'm planning to merge this tomorrow, or Friday at the latest - we've accumulated a few other PRs that are ready to merge, and we like to batch them up (as they have to be simultaneously merged here and our MS-internal repo, and that involves a bit of manual work).

@StephanTLavavej StephanTLavavej self-assigned this Sep 25, 2020
@StephanTLavavej StephanTLavavej merged commit c47cedc into microsoft:master Sep 25, 2020
@StephanTLavavej
Copy link
Member

Thanks again for implementing this feature, and congratulations on your first microsoft/STL commit! 🎉 😺 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx20 C++20 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P0339R6 polymorphic_allocator<>

6 participants