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

Inconsistency with registry.storage<const Component> and storage_for_type<const Component> #1217

Open
n0F4x opened this issue Feb 4, 2025 · 0 comments
Assignees
Labels
enhancement accepted requests, sooner or later I'll do it solved available upstream or in a branch

Comments

@n0F4x
Copy link

n0F4x commented Feb 4, 2025

registry.storage<const Component> would give back a const Storage&, but the function runs into a static_assert, which says that only non-const Components are allowed (e.g. registry.storage<Component>, this gives back a non-const Storage&)

Either const Components should be allowed, or there is no use for substituting the return type into a const Storage&.

This is annoying when one uses the registry's storage_for_type<Component> to figure out what Storage a Component would have.

@skypjack skypjack self-assigned this Feb 5, 2025
@skypjack skypjack added enhancement accepted requests, sooner or later I'll do it solved available upstream or in a branch labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement accepted requests, sooner or later I'll do it solved available upstream or in a branch
Projects
None yet
Development

No branches or pull requests

2 participants