-
-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
This code
#include <utility>
struct Movable
{
Movable() {}
Movable(Movable&& other) {}
Movable& operator=(Movable&& other)
{
return *this;
}
Movable(const Movable&) = delete;
Movable& operator=(const Movable&) = delete;
};
int main()
{
Movable m;
auto fun = [x = std::move(m)] () -> void {
};
fun();
}
instantiates the lambda with
__lambda_19 fun = __lambda_19{x};
However, this is wrong, because there is no x in main but only an m. Unfortunately, this example is even more comples, because m must be moved into the lambda, so also the constructor must be modified to move its arguments to the fields.
But a very cool project! 👍
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working