Skip to content

Implement P2652R2 Disallowing User Specialization Of allocator_traits - #3542

Merged
Stephan T. Lavavej (StephanTLavavej) merged 6 commits into
microsoft:mainfrom
frederick-vs-ja:p2652r2
Mar 7, 2023
Merged

Implement P2652R2 Disallowing User Specialization Of allocator_traits#3542
Stephan T. Lavavej (StephanTLavavej) merged 6 commits into
microsoft:mainfrom
frederick-vs-ja:p2652r2

Conversation

@frederick-vs-ja

@frederick-vs-ja A. Jiang (frederick-vs-ja) commented Mar 6, 2023

Copy link
Copy Markdown
Contributor

Fixes #3443. Also enables support and test coverage for EDG.

Upgrades allocator_traits::allocate_at_least to _NODISCARD_RAW_PTR_ALLOC.

I've filed DevCom-10301073 to request compiler support for this. Given compilers are already required to reject initializer_list specialization declarations, I think it's reasonable to do the same thing for allocator_traits.

@frederick-vs-ja
A. Jiang (frederick-vs-ja) requested a review from a team as a code owner March 6, 2023 16:40
Comment thread stl/inc/xmemory Outdated
Comment thread stl/inc/xmemory Outdated
Comment thread stl/inc/xmemory Outdated
Comment thread stl/inc/xmemory Outdated
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks! 😻 I've pushed very minor changes, including a tiny throughput improvement. FYI nicole mazzuca (@strega-nil-ms) as you already approved.

@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit daa994b into microsoft:main Mar 7, 2023
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks again for updating allocate_at_least()'s machinery, improving its nodiscard diagnostic, and requesting compiler support to keep bad kitties from jumping up on the table where they're not allowed! ⚙️ 🐈 😻

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

Labels

cxx23 C++23 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P2652R2 Disallowing User Specialization Of allocator_traits

3 participants