]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix circular dependency for bitmap_allocator [PR103381]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 23 Nov 2021 12:28:22 +0000 (12:28 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 23 Nov 2021 12:30:57 +0000 (12:30 +0000)
<ext/bitmap_allocator.h> includes <function>, and since C++17 that
includes <unordered_map>. If std::allocator is defined in terms of
__gnu_cxx::bitmap_allocator then you get a circular reference and
bootstrap fails when compiling src/c++17/*.cc.

libstdc++-v3/ChangeLog:

PR libstdc++/103381
* include/ext/bitmap_allocator.h: Include <bits/stl_function.h>
instead of <functional>.

libstdc++-v3/include/ext/bitmap_allocator.h

index cc80593764c457f62fd67883d1f46abc190342dd..0444deb479c7a6352d06b829f4c16e483d7d47fe 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <utility> // For std::pair.
 #include <bits/functexcept.h> // For __throw_bad_alloc().
-#include <functional> // For greater_equal, and less_equal.
+#include <bits/stl_function.h> // For greater_equal, and less_equal.
 #include <new> // For operator new.
 #include <debug/debug.h> // _GLIBCXX_DEBUG_ASSERT
 #include <ext/concurrence.h>