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

Cannot be used in constexpr function because of missing constexpr destructor #46

Open
thmxv opened this issue Jul 2, 2020 · 1 comment

Comments

@thmxv
Copy link

thmxv commented Jul 2, 2020

When trying to use fixed_capacity_vector in a constexpr function in C++20. The compilation failed because fixed_capacity_vector is not a literal type because it is missing a constexpr destructor.

After marking the existing destructors constexpr and adding
copnstexpr ~type_name() = default;
to several types, the issue was solved.

Is there any chances to get those changes in the main branch?

@thmxv
Copy link
Author

thmxv commented Aug 15, 2020

Apparently this was a compiler issue with early C++20 support. It looks like it is working fine now.

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