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

Static assert that field types are trivial #236

Closed
bernhardmgruber opened this issue May 15, 2021 · 1 comment · Fixed by #329
Closed

Static assert that field types are trivial #236

bernhardmgruber opened this issue May 15, 2021 · 1 comment · Fixed by #329
Labels
bug Something isn't working

Comments

@bernhardmgruber
Copy link
Member

LLAMA assumes in many places that the types used in fields are trivially constructible, copyable and destructible. This should be asserted on the types used in the record domain. If this property is not fulfulled, LLAMA should fail to compile to prevent unwanted results.

@bernhardmgruber
Copy link
Member Author

bernhardmgruber commented Jun 3, 2021

For a LLAMA view itself, it suffices that the field types are trivially constructible and destructible.
Trivial copyability might be relevant for LLAMA's copy, but that is not yet inside the LLAMA library (it's in the viewcopy example).

But rather than forbidding copies of non-trivially-copyable types, we could actually just run their copy dtors.

bernhardmgruber added a commit to bernhardmgruber/llama that referenced this issue Jun 3, 2021
bernhardmgruber added a commit to bernhardmgruber/llama that referenced this issue Jun 3, 2021
bernhardmgruber added a commit to bernhardmgruber/llama that referenced this issue Jun 3, 2021
bernhardmgruber added a commit to bernhardmgruber/llama that referenced this issue Jul 9, 2021
bernhardmgruber added a commit to bernhardmgruber/llama that referenced this issue Jul 9, 2021
@bernhardmgruber bernhardmgruber linked a pull request Jul 9, 2021 that will close this issue
@bernhardmgruber bernhardmgruber added the bug Something isn't working label Jul 9, 2021
bernhardmgruber added a commit that referenced this issue Jul 9, 2021
bernhardmgruber added a commit that referenced this issue Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant