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

Default destructor missing when using define_aggregate #115

Open
ilmmatias opened this issue Nov 11, 2024 · 2 comments
Open

Default destructor missing when using define_aggregate #115

ilmmatias opened this issue Nov 11, 2024 · 2 comments

Comments

@ilmmatias
Copy link

According to [meta.reflection.define.aggregate], a default empty destructor should be provided by define_aggregate on unions containing alternatives with a non-trivial destructor, but that currently doesn't happen.
The same should also happen for alternatives with a non-trivial constructor (a default empty constructor should be given).

Without this, 3.9 A Simple Variant Type doesn't compile when std::string is one of the pack parameters.
See: https://godbolt.org/z/3c1dqe6Ko

@katzdm
Copy link
Collaborator

katzdm commented Nov 11, 2024

You're right! Thanks for calling this out; I'd forgotten about this behavior.

@BaLiKfromUA
Copy link

Just for visibility, I am looking on this issue

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

3 participants