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

Feature: specializations to reduce dispatch overhead of polymorphic_allocator #32

Merged
merged 4 commits into from
Feb 29, 2024

Conversation

liss-h
Copy link
Contributor

@liss-h liss-h commented Feb 28, 2024

This PR adds specializations for polymorphic_allocator<T, Alloc> and polymorphic_allocator<T, Alloc1, Alloc2> that aim to reduce dispatch overhead of the function calls.

TODOs:

  • How does std::variant implement operator=?

Copy link
Member

@bigerl bigerl left a comment

Choose a reason for hiding this comment

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

thx for the PR. I hope I didn't overlook anything in the verbosity of stl template stuff. Please find my comments below.

@liss-h
Copy link
Contributor Author

liss-h commented Feb 29, 2024

How does std::variant implement operator=?

It doesn't use union, so whatever it does, doesn't really apply here

@liss-h
Copy link
Contributor Author

liss-h commented Feb 29, 2024

So: any further ideas how to make operator= and swap less ugly? 😅

@bigerl
Copy link
Member

bigerl commented Feb 29, 2024

So: any further ideas how to make operator= and swap less ugly? 😅

not at all.

but personally I don't find it too bad :)

@liss-h liss-h marked this pull request as ready for review February 29, 2024 14:17
@liss-h liss-h merged commit 82557eb into develop Feb 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants