[committed] libstdc++: Make std::jthread support pointers to member functions [PR 100612]

Ville Voutilainen ville.voutilainen@gmail.com
Fri Oct 1 20:25:52 GMT 2021


On Fri, 1 Oct 2021 at 23:19, Jonathan Wakely via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> This adds a non-standard extension to support initializing a
> std::jthread with a pointer to a member function that expects a
> stop_token to be added to the arguments. That use case is not supported
> by C++20, because the stop_token would get added as the first argument,
> which is where the object argument needs to be to invoke a pointer to
> member function.

Yeah, and the use-case is supported by applying a wrapper that does
the right kind of argument binding, like
shown in the BZ. Why are we doing this?


More information about the Libstdc++ mailing list