I have a parameter (in this case std::vector) that I need to pass to an async method (preferably by move) and to a callback lambda. Does the approach below guarantee that the lambda will be initialized first (implying vector being copied) so that I can move the vector to the async method?
Method(std::vector<std::string> vec)
{
AsyncMethod(std::move(vec), [vec]()
{
// act on vec
});
}