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.
---
Evening,

This patch adds std::allocator as a declaration to freestanding, so that
it doesn't block various other bits of the library (such as collections
or the generators that I intend to send in soon) from being added to
freestanding anymore.

I don't intend to pull in anything but <generator> into freestanding
in this release, though, so, this patch will have little impact for now.

Testing on x86_64-pc-linux-gnu (the tests are not done yet, but I see no
relevant fails in previous test runs).  The follow-up patch also marks a
new test as freestanding (as it was failing).

OK for trunk?

Have a lovely evening!

 libstdc++-v3/include/bits/memoryfwd.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/bits/memoryfwd.h 
b/libstdc++-v3/include/bits/memoryfwd.h
index 330a6df7f44a..2b79cd8880a1 100644
--- a/libstdc++-v3/include/bits/memoryfwd.h
+++ b/libstdc++-v3/include/bits/memoryfwd.h
@@ -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.
-- 
2.42.1

Reply via email to