[libcxx-commits] [libcxx] [libc++] Remove allocator support from std::function (PR #140395)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 5 10:57:26 PDT 2025


================
@@ -17,13 +17,7 @@
 #include <__functional/binary_function.h>
 #include <__functional/invoke.h>
 #include <__functional/unary_function.h>
-#include <__iterator/iterator_traits.h>
 #include <__memory/addressof.h>
-#include <__memory/allocator.h>
-#include <__memory/allocator_destructor.h>
-#include <__memory/allocator_traits.h>
-#include <__memory/compressed_pair.h>
-#include <__memory/unique_ptr.h>
 #include <__type_traits/aligned_storage.h>
----------------
ldionne wrote:

In the PR description, can you please describe the functional change that this introduces? I know you believe it's small and likely inconsequential, but `std::function` is one of the most widely used types in the library, so we're bound to hit Hyrum's law. I'd like a description of the impact of the change, as small as it is perceived, so that we can decide how to best roll it out. A release note also seems desirable.

https://github.com/llvm/llvm-project/pull/140395


More information about the libcxx-commits mailing list