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

Fix/do not store owning data as const #752

Merged
merged 6 commits into from
Sep 30, 2024

Conversation

mschimek
Copy link
Member

@mschimek mschimek commented Sep 16, 2024

We should avoid storing the underlying data as const in constant owning data buffers. While using const ensures read-only access via C++'s constness guarantees, it also results in unnecessary data copying when attempting to extract the data. Moreover, this approach prevents storing move-only types altogether.

@mschimek mschimek requested a review from niklas-uhl September 16, 2024 10:34
@mschimek mschimek requested a review from niklas-uhl September 30, 2024 06:21
@mschimek mschimek merged commit a696927 into main Sep 30, 2024
7 checks passed
@mschimek mschimek deleted the fix/do-not-store-owning-data-as-const branch September 30, 2024 06:40
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.

2 participants