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

Improve enable_allocator_from_this #17

Open
alandefreitas opened this issue Apr 17, 2022 · 0 comments
Open

Improve enable_allocator_from_this #17

alandefreitas opened this issue Apr 17, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@alandefreitas
Copy link
Owner

The problem

enable_allocator_from_this is used to store the allocator with EBO. Its interface should be improved to reflect the proper API for EBO.

Proposed solution

https://github.com/alandefreitas/futures/blob/master/include/futures/detail/utility/maybe_empty.hpp

Alternatives I've considered

No EBO won't work for our classes. Maintaining the current API is not safe.

Additional context

EBO makes the containers 8 bytes smaller when the allocator is not stateful, such as std::allocator.

@alandefreitas alandefreitas added the enhancement New feature or request label Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant