When we eventually get to implementing algorithms on ranges, we'll want
to avoid re-writing the algorithms from scratch. To do so, we'll need to
refactor how we write algorithms so that the same core implementation can
be used by both normal algorithms and ranges algorithms. The ranges
algorithms can't just call the iterator ones because the ranges algorithms
are more general (e.g. they accept an iterator and a sentinel).
The trick is to factor the algorithm into a private name and make sure
it works on an (iterator, sentinel) pair, and then use that from the
normal algorithm. Once we add the ranges algorithm, we will only need
to shim the result into the appropriate ranges result type (in_out_result
for ranges::copy).
What's the benefit of putting these into a namespace? Once we add the CPOs we're going to create two more namespaces. I think this namespace might add a bit of confusions, and I don't see any benefit (especially in such a small file).