You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, function requires the stored target object to be copy constructible while packaged_task doesn't, which rendered our implementation strategy non-conforming (reject-valid) for a long while, see #321.
#4946 partially fixed the non-conformance. However, the fix was imperfect:
it introduced handling for move-only functors which function isn't supposed to support,
it was broken when one specializes function for program-defined types, although I don't think anyone should do this, and
when the functor's copy constructor is eligible but ill-formed, there's still hard error from it, which isn't supposed to happen for packaged_task.
In vNext where ABI breakage is available, we need to change the internal storage type. It seems that the implementation details of that type can be shared with move_only_function, but it doesn't seem possible to directly use move_only_function because move_only_function is only available since C++23.
vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.
The text was updated successfully, but these errors were encountered:
Currently, the internal state class
_Packaged_state
used bypackaged_task
stores afunction
.STL/stl/inc/future
Lines 481 to 486 in 37120ed
STL/stl/inc/future
Lines 550 to 551 in 37120ed
However,
function
requires the stored target object to be copy constructible whilepackaged_task
doesn't, which rendered our implementation strategy non-conforming (reject-valid) for a long while, see #321.#4946 partially fixed the non-conformance. However, the fix was imperfect:
function
isn't supposed to support,function
for program-defined types, although I don't think anyone should do this, andpackaged_task
.In vNext where ABI breakage is available, we need to change the internal storage type. It seems that the implementation details of that type can be shared with
move_only_function
, but it doesn't seem possible to directly usemove_only_function
becausemove_only_function
is only available since C++23.vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.
The text was updated successfully, but these errors were encountered: