Skip to content

<future>: packaged_task can't be constructed from a move-only lambda #321

@fsb4000

Description

@fsb4000

Describe the bug
Can't create std::packaged_task with lambda.

I receive compilation error:

call to implicitly-deleted copy constructor of '(lambda at main.cpp)'

Command-line test case
STL version (git commit or Visual Studio version): Visual Studio 2019 16.3.9

https://godbolt.org/z/2CysfN

Expected behavior
Should work like gcc linux/clang linux or mingw64-gcc and mingw64-clang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions