Skip to content

fix: address fmath.h warning with ispow2#5033

Open
lgritz wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
lgritz:lg-fmath
Open

fix: address fmath.h warning with ispow2#5033
lgritz wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
lgritz:lg-fmath

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Feb 7, 2026

I was seeing warnings with instantiation of the ispow2 function template for unsigned type, where the x >= 0 clause is meaningless. Use a constexpr if to eliminate that pointless test for unsigned types.

Except poor old icc, who can't handle it without clearly incorrect errors.

I was seeing warnings with instantiation of the ispow2 function
template for unsigned type, where the `x >= 0` clause is
meaningless. Use a constexpr if to eliminate that pointless test for
unsigned types.

Except poor old icc, who can't handle it without clearly incorrect
errors.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
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