#1824

Why isn't repeat_n a range adaptor?

OpenMick235711opened 2y ago

Currently, views::repeat_n is a range factory that cannot be piped into:

std::vector vec{1, 2, 3};
views::repeat_n(vec, 2); // [[1, 2, 3], [1, 2, 3]]

So this naturally raises the question: why isn't repeat_n an adaptor, such that vec | views::repeat_n(2) is also valid?

Activity

0

No activity yet.