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

enum_flags_name() can be constexpr, with returning static_string if enum is flag #152

Open
schaumb opened this issue Mar 4, 2022 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@schaumb
Copy link
Contributor

schaumb commented Mar 4, 2022

enum_flags_name() currently returns with std::string, which is can not be a constant expression.
Constexpr time can be calculated of the enum flags returning string maximum size (sum of all {enum name size} + count-1 for the separators).
This can be used as the result of the static_string template argument.

@Neargye Neargye added enhancement New feature or request help wanted Extra attention is needed labels Mar 8, 2022
@Neargye Neargye removed the enhancement New feature or request label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants