Before this stays unnoticed: clangs implementations of std::isinf and std::isnan appear to be unreliable. The easiest way for us would be to not use them for implementing the corresponding numext::isinf/isnan methods, but make hand-coded implementations.
This only concerns "old" versions of clang. I've already spent a lot of time trying to workaround the issue with no luck, and I'd thus vote for wontfix. At least, we are consistent with the respective STL implementation. This is what I conclude in bug 1008.
If we have SSE enabled, we could hand-code this using the corresponding cmpss/cmpsd instructions.
If SSE is disabled, it seems the only error is:
std::isinf(nan) == 1
which could be fixed by defining (inefficient, but correct):
numext::isinf(x) = std::isinf(x) && ! std::isnan(x);
Unless, simply std::abs(x)>NumTraits<Scalar>::highest() works as well.