Fix call unwrapping optimization by AlexGuteniev · Pull Request #5919 · microsoft/STL (original) (raw)

Fix regression in #5808.

We can't move out lvalue reference.

The optimization for lvalue references is still possible, but we have to handle this case slightly differently.
Now, if the function is passed as lvalue, we copy from the passed function. instead of moving it out.


Other cases of lvalue reference in call unwrapping: