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

Reuse memory in assign #71

Closed
wants to merge 7 commits into from
Closed

Reuse memory in assign #71

wants to merge 7 commits into from

Conversation

kelbon
Copy link
Owner

@kelbon kelbon commented Feb 16, 2024

  • adds reusing memory in assigments and emplace
  • adds 'replace_with_bytes' (effectively reserve) 'replace_with' (assing with strong exception guarantee)
  • removes strong exception guarantee from assignments (now basic guarantee), because its too much to not reuse memory, problem very similar to std::variant::valueless_by_exception

Maybe:

  • copy_with deprecated (not depends on Alloc and SooS), because of that materialization and copy assign/copy ctor cannot detect if they require allocation staticaly, so aa::unreachable_alloc less usable

@kelbon kelbon closed this Feb 19, 2024
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.

1 participant