]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Use std::add_lvalue_reference in src/c++11/mutex.cc
authorJonathan Wakely <jwakely@redhat.com>
Fri, 19 Dec 2025 09:12:40 +0000 (09:12 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 19 Dec 2025 10:55:47 +0000 (10:55 +0000)
Adjust the return type to be consistent with how it's declared in
<mutex>.

libstdc++-v3/ChangeLog:

* src/c++11/mutex.cc [_GLIBCXX_NO_EXTERN_THREAD_LOCAL]
(__get_once_call): Use std::add_lvalue_reference.

libstdc++-v3/src/c++11/mutex.cc

index 82f0afa4cb4e10e0a890ea71bdc8200e903deadf..91968ab47bd594ae965ca2562e20745f57274e39 100644 (file)
@@ -42,7 +42,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   __get_once_callable() noexcept
   { return __once_callable; }
 
-  __typeof__(void (*)())&
+  std::add_lvalue_reference<void (*)()>::type
   __get_once_call() noexcept
   { return __once_call; }