79192517

Date: 2024-11-15 13:17:29
Score: 0.5
Natty:
Report link

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;
}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: qloq