This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]