[libcxx-commits] [PATCH] D107663: [libc++] Restore `basic_ios`'s implicit conversion to `bool` in C++03 mode.

Eli Friedman via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 9 12:01:44 PDT 2021


efriedma added a comment.

This codepath is only used if someone is explicitly building with -std=c++98.  If someone is explicitly requesting -std=c++98, they're presumably dealing with ancient code they can't update for some reason.  The only downside I can think of is a minor risk of ODR violations if you mix -std=c++98 and -std=c++11 code.

And yes, SPEC2006 is still relevant for various companies.



================
Comment at: libcxx/include/ios:614
+    _LIBCPP_INLINE_VISIBILITY
+    operator const void*() const {return fail() ? nullptr : this;}
+#else
----------------
The ancient standards actually specify `operator void*`, not `operator const void*`, but that probably doesn't matter.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107663



More information about the libcxx-commits mailing list