-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implement polymorphic_allocator<> #1311
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
Conversation
StephanTLavavej
left a comment
There was a problem hiding this 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.
StephanTLavavej
left a comment
There was a problem hiding this 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.
Co-authored-by: Stephan T. Lavavej <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
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`.
StephanTLavavej
left a comment
There was a problem hiding this 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_tfor 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>forstd::uintptr_t. - Need
<limits>, not<numeric>, forstd::numeric_limits. - Need
<new>forstd::bad_allocandstd::bad_array_new_length.
- Need
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! 🎉
Co-authored-by: Casey Carter <[email protected]>
Co-authored-by: Casey Carter <[email protected]>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
StephanTLavavej
left a comment
There was a problem hiding this 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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
CaseyCarter
left a comment
There was a problem hiding this 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!
|
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). |
|
Thanks again for implementing this feature, and congratulations on your first microsoft/STL commit! 🎉 😺 🚀 |
Resolves #10
References
polymorphic_allocator<>as a vocabulary type