[gcc(refs/users/mikael/heads/pr121185_v01)] libstdc++: Qualify addressof calls in inplace_vector [PR119137]

Mikael Morin mikael@gcc.gnu.org
Thu Jul 24 08:06:13 GMT 2025


https://gcc.gnu.org/g:9ed7762230022c54de98062855433dff47ce9521

commit 9ed7762230022c54de98062855433dff47ce9521
Author: Tomasz Kamiński <tkaminsk@redhat.com>
Date:   Fri Jul 18 15:32:04 2025 +0200

    libstdc++: Qualify addressof calls in inplace_vector [PR119137]
    
            PR libstdc++/119137
    
    libstdc++-v3/ChangeLog:
    
            * include/std/inplace_vector (inplace_vector::operator=):
            Qualify call to std::addressof.

Diff:
---
 libstdc++-v3/include/std/inplace_vector | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/std/inplace_vector b/libstdc++-v3/include/std/inplace_vector
index e1e4778528d3..e0943f52ab83 100644
--- a/libstdc++-v3/include/std/inplace_vector
+++ b/libstdc++-v3/include/std/inplace_vector
@@ -174,7 +174,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       noexcept(is_nothrow_copy_assignable_v<_Tp>
 		 && is_nothrow_copy_constructible_v<_Tp>)
       {
-	if (addressof(__other) != this) [[likely]]
+	if (std::addressof(__other) != this) [[likely]]
 	  assign(__other.begin(), __other.end());
 	return *this;
       }
@@ -191,7 +191,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       noexcept(is_nothrow_move_assignable_v<_Tp>
 		 && is_nothrow_move_constructible_v<_Tp>)
       {
-	if (addressof(__other) != this) [[likely]]
+	if (std::addressof(__other) != this) [[likely]]
 	  assign(std::make_move_iterator(__other.begin()),
 		 std::make_move_iterator(__other.end()));
 	return *this;


More information about the Libstdc++-cvs mailing list