indeed does not assert, what does assert (with a nice "invalid comparator" message in MSVC) is
std::sort(..., [] (float a, float b) { return a <= b; });
std::sort(..., [] (float a, float b) { return true; });
or anything else that is not a correct < implementation.
I'd assume they don't want to introduce a check for the FP case as it would break pretty much all the code on earth which assumes that NaNs and Infs do not exist.
> I'd assume they don't want to introduce a check for the FP case as it would break pretty much all the code on earth which assumes that NaNs and Infs do not exist.
There are even compile flags that let the compiler assume that as well - some of them as benign sounding as -ffast-math or -Ofast.