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

Bring in some C++20 template language in flags.h #381

Open
sebjameswml opened this issue Feb 20, 2025 · 0 comments
Open

Bring in some C++20 template language in flags.h #381

sebjameswml opened this issue Feb 20, 2025 · 0 comments
Labels
housekeeping Keeping it neat and tidy without adding new features

Comments

@sebjameswml
Copy link
Collaborator

From morph/flags.h:

The (more readable) C++20 equivalent to the C++17 compatible template declaration:

template <typename E, typename std::enable_if<std::is_enum<E>{}, bool>::type = true>

is:

template <typename E>
requires std::is_enum_v<E>

can it be one line?

template <typename E> requires std::is_enum_v<E>

Anyhow - do the replacement in flags.h after merging the constexpr code.

@sebjameswml sebjameswml added enhancement New feature or request housekeeping Keeping it neat and tidy without adding new features and removed enhancement New feature or request labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Keeping it neat and tidy without adding new features
Projects
None yet
Development

No branches or pull requests

1 participant