From 33502a11e47a87f1423a80bead8e87fbd6363fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Dumont?= Date: Wed, 18 Dec 2024 19:18:32 +0100 Subject: [PATCH] libstdc++: Have std::addressof use __builtin_addressof Rather than calling std::__addressof in std::addressof we can directly call __builtin_addressof to bypass 1 function call. libstdc++-v3/ChangeLog: * include/bits/move.h (std::addressof): Call __builtin_addressof. --- libstdc++-v3/include/bits/move.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h index 8397a01b632..421e37509ea 100644 --- a/libstdc++-v3/include/bits/move.h +++ b/libstdc++-v3/include/bits/move.h @@ -161,7 +161,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_NODISCARD inline _GLIBCXX17_CONSTEXPR _Tp* addressof(_Tp& __r) noexcept - { return std::__addressof(__r); } + { return __builtin_addressof(__r); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2598. addressof works on temporaries