[libcxx-commits] [PATCH] D127033: [libc++] Define ostream nullptr inserter for >= C++17 only

Jonathan Wakely via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 7 07:40:43 PDT 2022


jwakely added a comment.

I've done some digging. It looks like ostream support for `nullptr_t` was discussed in August 2011 (thread beginning at c++std-lib-30987) and the outcome was "not a defect, wait for a new standard". That supports my feeling that it never should have been handled as a library issue.

Also, Billy O'Neal reported that the new overload caused ambiguities for some morally questionable code in Google Test, which was trying to define it's own overload for this type. Breaking existing code (even if it's bad code) is another reason to not enable it unconditionally. I guess that's no longer an issue, or somebody would have noticed it when using gtest and libc++!

It seems like the only known uses for this `operator<<` are in Boost.Test, Google Test, and Mozilla's assertion macros ... so I super don't care about it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127033/new/

https://reviews.llvm.org/D127033



More information about the libcxx-commits mailing list