[PATCH RFA] libstdc++: add std:: to pmr alias templates

Jason Merrill jason@redhat.com
Sat Oct 3 19:25:11 GMT 2026


Tested x86_64-pc-linux-gnu, OK for trunk?

-- 8< --

When #including this header after import std per P1811, the alias template
is already in scope, so we can't use the unqualified name to refer to the
template in std.  So use a qualified name.

libstdc++-v3/ChangeLog:

	* include/bits/indirect.h (pmr::indirect): Add std:: qualification.
	(pmr::polymorphic): Likewise.
---
 libstdc++-v3/include/bits/indirect.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/bits/indirect.h b/libstdc++-v3/include/bits/indirect.h
index cb6e9535a8e..9aff4794f0b 100644
--- a/libstdc++-v3/include/bits/indirect.h
+++ b/libstdc++-v3/include/bits/indirect.h
@@ -62,7 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   namespace pmr
   {
     template<typename _Tp>
-      using indirect = indirect<_Tp, polymorphic_allocator<_Tp>>;
+      using indirect = std::indirect<_Tp, polymorphic_allocator<_Tp>>;
   }
 #endif
 
@@ -462,7 +462,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   namespace pmr
   {
     template<typename _Tp>
-      using polymorphic = polymorphic<_Tp, polymorphic_allocator<_Tp>>;
+      using polymorphic = std::polymorphic<_Tp, polymorphic_allocator<_Tp>>;
   }
 
   // [polymorphic], class template polymorphic

base-commit: 148d5582275a0c3046d6d231079459515910c286
-- 
2.55.0



More information about the Gcc-patches mailing list