Skip to content

Conversation

@shangxinli
Copy link
Contributor

@shangxinli shangxinli commented Dec 30, 2025

The static_assert(false, ...) in the ByteSwap function template was unconditionally evaluated at template definition time, which could cause compilation failures even when the else branch is never instantiated.

The static_assert(false, ...) in the ByteSwap function template was
unconditionally evaluated at template definition time, which could
cause compilation failures even when the else branch is never
instantiated.

Changed to static_assert(sizeof(T) == 0, ...) to make the assertion
dependent on the template parameter T. This ensures the assertion
only triggers when the else branch is actually instantiated with an
unsupported floating-point type size.
@wgtmac wgtmac merged commit d645802 into apache:main Dec 31, 2025
10 checks passed
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.

2 participants