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