bind , .
( ). . std::invoke ++ 17.
. , , , bind , . - , , operator().
, . , , .
auto funcA =
[pw=std::make_unique<std::vector<int>>(22,1)]
{
std::cout << "size of vector2: " << pw->size() << std::endl;
};
auto funcB =
[pw=std::make_unique<std::vector<int>>(22,1)]() mutable
{
std::cout << "size of vector2: " << pw->size() << std::endl;
};
, , . .
funcA a const unique_ptr, funcB const unique_ptr. ptr; .
std::bind lambdas, ++, , . lambdas ++ 14, , bind - .
std::bind , , bind bind.