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

opt: fix move ctor, move assign and emplace #5

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

johannst
Copy link
Contributor

@johannst johannst commented Apr 8, 2024

Here is an initial version, attempting to fix #4.

  • fix move ctor, move assign and emplace
  • move all destruction logic into Opt::clear().
  • add Opt unittest counting object instances.

Additionally
* move all destruction logic into Opt<T>::clear().
* add Opt unittest counting object instances.
@TheNumbat
Copy link
Owner

Looks good, thanks for the fix.
Variant has the same problem; I'll fix that momentarily.

@TheNumbat TheNumbat merged commit e24d71e into TheNumbat:main Apr 8, 2024
4 of 5 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.

Opt<T> missing destructor calls of inner type T
2 participants