Tip-of-tree clang produces -Wtautological-constant-compare for
tautological constant comparisons, and these pieces of code will trigger
that diagnostic when int and long have the same size (for example,
when compiling for a 32-bit target, or for Windows 64-bit).
I personally find the diagnostic to be pretty unhelpful when dealing
with templates, since my change is essentially manually writing out the
code the compiler would have (or at least should have) produced anyway.
An alternative would be to just disable the diagnostic around these
regions instead of manually avoiding the comparisons.