[libcxx-commits] [PATCH] D127908: [libc++] Remove std::function in C++03

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 17 14:13:05 PDT 2022

ldionne added subscribers: EricWF, libc++ vendors.
ldionne added a comment.

In D127908#3587636 <https://reviews.llvm.org/D127908#3587636>, @jloser wrote:

> I'm OK removing this extension with an opt-in knob depending on how bad the breakage is internally at Apple/Google.

Just to make sure everyone's on the same page, we use these large code bases as guinea pigs to gauge how much breakage is likely out there -- it's not that we try to cater to these two code bases more specifically. If other vendors have the capability to run builds on large scale code bases, it would be great as well. Internal ref for me: 95412837.

Adding libc++ vendors for awareness. @EricWF Would you be able to try this out on a large code base internally? I suspect that most people are not using this extension, but who knows.

Comment at: libcxx/docs/ReleaseNotes.rst:145
+- ``std::function`` has been remove from C++03. If you are using it please remove the uses
+  or upgrade to C++11. It is possible to re-enable ``std::function`` by defining
jloser wrote:
> There are a few typos here. How about this, instead?
> > `std::function` has been removed in C++03.  If you are using it, please remove usages or upgrade to C++11 or later. It is possible to re-enable `std::function` in C++03 mode by defining `_LIBCPP_ENABLE_CXX03_FUNCTION`. This option will be removed in LLVM 16.
I like this reformulation. In particular, let's make sure to use LLVM 16, not libc++16 (which is not an official thing).

Comment at: libcxx/include/__functional/function.h:1242
-#else // _LIBCPP_CXX03_LANG

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list