Skip to content

Conversation

@frobtech
Copy link
Contributor

Heavily based on work by @vporpo.

Don't use plain `if` for things that are compile-time constants.
Instead, use `if constexpr`.  This both ensures that these are
properly wired up constant expressions as intended, and prevents
warnings from the compiler about useless `if` checks that look in
the source like they're meant to do something at runtime but will
just be compiled away.
@frobtech frobtech closed this Oct 23, 2024
@frobtech frobtech deleted the p/libc-if-constexpr branch October 23, 2024 04:30
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.

1 participant