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

Document destructor / object expectations #2

Open
Geod24 opened this issue May 3, 2018 · 1 comment
Open

Document destructor / object expectations #2

Geod24 opened this issue May 3, 2018 · 1 comment

Comments

@Geod24
Copy link
Owner

Geod24 commented May 3, 2018

Destructors are not called when a variant is assigned to. Likewise, some D features might not work out of the box. I should document them, and why.

@Geod24
Copy link
Owner Author

Geod24 commented Aug 7, 2018

After much thought, destructors should not but called by minivariant.
However, an additional utility might be built on top of it to do it, e.g.

auto var = WithDestructor!(Variant!(Args))(StructWithDtors(42));

The point of having WithDestructor wrap a Variant is to be able to compose, should other features be needed.

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

No branches or pull requests

1 participant