std::vector<int> range(5); for (size_t i = 0; i < range.size(); i++) { range[i] = static_cast<int>(i) + 1; }