On Fri, Dec 19, 2025 at 11:57 AM Jonathan Wakely <[email protected]> wrote:
> 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.
> ---
>
> Pushed to trunk.
>
> libstdc++-v3/src/c++11/mutex.cc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/src/c++11/mutex.cc
> b/libstdc++-v3/src/c++11/mutex.cc
> index 82f0afa4cb4e..91968ab47bd5 100644
> --- a/libstdc++-v3/src/c++11/mutex.cc
> +++ b/libstdc++-v3/src/c++11/mutex.cc
> @@ -42,7 +42,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> __get_once_callable() noexcept
> { return __once_callable; }
>
> - __typeof__(void (*)())&
> + std::add_lvalue_reference<void (*)()>::type
>
Why not simply void(*&)()?
> __get_once_call() noexcept
> { return __once_call; }
>
> --
> 2.52.0
>
>