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

Apply consteval on appropriate basic_hashed_string related functions #1203

Open
wants to merge 4 commits into
base: wip
Choose a base branch
from

Conversation

DNKpp
Copy link
Contributor

@DNKpp DNKpp commented Dec 16, 2024

It's easy to introduce unnecessary runtime-overhead by accident. The documentation even states this:

No string-to-number conversion will take place at runtime if used carefully.

Applying consteval on the two members, which accept an c-array, seems appropriate as they are obviously intended for compile-time construction.
Making the literals entt::literal::_hs and _hws consteval too, because there is literally no reason to use them at runtime.

@skypjack skypjack self-requested a review December 18, 2024 15:44
@skypjack skypjack self-assigned this Dec 18, 2024
@skypjack skypjack added the enhancement accepted requests, sooner or later I'll do it label Dec 18, 2024
@skypjack skypjack force-pushed the wip branch 4 times, most recently from 5a2da65 to eccac01 Compare December 23, 2024 11:38
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants