[llvm] r210100 - Add operator== and operator!= to compare with nullptr.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jun 3 08:39:28 PDT 2014


> I agree, but I don't think they lack value in other cases. (I'm going
> to go out on a limb and bet that std::shared_ptr has tests for its
> op==(nullptr_t), and I'd lack confidence in it as a library if it
> didn't)
>

And in an standard library environment where there are many == and !=
implementations, it would be a really good idea to have a templated
test that checks that they are the opposite from each other.

Adding one test every time someone adding a new == is what I can't see
enough value in.

It looks IntrusiveRefCntPtr is really only used in clang. If not for
the fact that it should be deleted completely, it should otherwise
just be moved to clang.

Cheers,
Rafael



More information about the llvm-commits mailing list