]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: declare std::allocator in !HOSTED as an extension
authorArsen Arsenović <arsen@aarsen.me>
Wed, 8 Nov 2023 09:22:47 +0000 (10:22 +0100)
committerArsen Arsenović <arsen@gcc.gnu.org>
Thu, 9 Nov 2023 23:10:51 +0000 (00:10 +0100)
This allows us to add features to freestanding which allow specifying
non-default allocators (generators, collections, ...) without having to
modify them.

libstdc++-v3/ChangeLog:

* include/bits/memoryfwd.h: Remove HOSTED check around allocator
and its specializations.

libstdc++-v3/include/bits/memoryfwd.h

index 330a6df7f44a1cd957c1d659e7c2285adb07705d..2b79cd8880a152df1c93b68905bc8501fa4f832e 100644 (file)
@@ -60,13 +60,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
    * @{
    */
 
-#if _GLIBCXX_HOSTED
+  // Included in freestanding as a libstdc++ extension.
   template<typename>
     class allocator;
 
   template<>
     class allocator<void>;
-#endif
 
 #if __cplusplus >= 201103L
   /// Declare uses_allocator so it can be specialized in `<queue>` etc.