fix: Potential -Wdeprecated-literal-operator error in half.hpp inclusion #1229
+1
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While compiling with clang v20+, it was emitting -Wdeprecated-literal-operator, and in future versions, this warning can be emitted as an error.
Since we don't want to change the third party, we fixed this inside support/Half.h in this commit: afd78dd
However, there is another direct inclusion of half/half.hpp inside tests/validation/CPP/LUT.cpp, and we could potentially hit this issue there again. Currently, we don't because of possible transitive inclusions including support/Half.h before we explicitly include half/half.hpp. But, relying on this is not stable and we'd like to use support/Half.h for every usage/inclusion of half.hpp members.
You can easily reproduce an error by moving the include of half.hpp to the top, confirming our hypothesis that the error was suppressed only because it was suppressed through a transitive support/Half.h inclusion.
Partially Resolves: COMPMID-7924
Change-Id: I204b14eebabe27b06eebf3024938e41748500785