Ooh. Thanks tkausl. It seems I just forgot to call lambda. Here is fixed snippet:
template<typename... Args>
std::vector<std::shared_ptr<int>> createSourceVector(Args... args)
{
std::vector<std::shared_ptr<int>> result;
(
[&]() {
result.push_back(std::make_shared<int>(args));
}(),
...);
return result;
}