From: Arsen Arsenović Date: Wed, 8 Nov 2023 09:22:47 +0000 (+0100) Subject: libstdc++: declare std::allocator in !HOSTED as an extension X-Git-Tag: basepoints/gcc-15~4838 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9dbc835d4d6353281218d030f5aed6fdef43a66;p=thirdparty%2Fgcc.git libstdc++: declare std::allocator in !HOSTED as an extension 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. --- 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 class allocator; template<> class allocator; -#endif #if __cplusplus >= 201103L /// Declare uses_allocator so it can be specialized in `` etc.