Reputation: 6657
Looking through the algorithm library, there are a few std::ranges::XXX_n
function have basically the same definition as their std::XXX_n
counterparts, namely copy_n
, fill_n
, and generate_n
.
The only difference between them are the ranges version often applied more concept
and requires
to the parameters, which probably should be added to the non-range version anyways(I mean it doesn't make sense to call a generator that is not invokable
, or copy something that is not copyable
); Plus you can't apply execution policy on them because they meant to be ranges.
So my guess is just to have a unifying way of calling things, or am I totally missing something?
Upvotes: 3
Views: 53