This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] add missing dg-require to tests
> Fixed like so ...
>
> * include/std/mutex (call_once): Store closure in __once_functor
> as bound function wrapper might not be copyable.
>
> The fix would be simpler but the lambda can't capture the parameter
> pack directly because of PR c++/41933. Unfortunately the non-TLS
> std::call_once implementation is quite wasteful, creating a function
> wrapper, which is captured by a closure, which is stored in a
> std::function. IIRC the std::function has to be kept for backwards
> compatibility, otherwise we could just store the closure and a pointer
> to a function, like the TLS code but using a mutex to serialize calls.
Thanks a lot for the quick fix!
--
Eric Botcazou