std::unique_ptr<std::array<int, 3>> nums = std::make_unique<std::array<int, 3>, std::initializer_list<int>>({ 5, 6, 7 });
I read here that this is the way to do it, but the compiler throws the following error:
C2664: 'std::array::array(std::array &&)': cannot convert argument 1 from 'std::initializer_list' to 'const std::array &'
Does anyone have an idea why this is happening?