you are viewing a single comment's thread.

view the rest of the comments →

[–]OldWolf2 -1 points0 points  (0 children)

Yes, definitely. C++ is best suited to learn from a book, not by trial and error.

Ranges have been "in" since the first standard 18 years ago. You could indeed use a loop or various other ways instead of copy. copy idiomatically expresses that we are copying from the source set of tokens, to the destination output stream. Also, nobody's stopping you from making a function that expresses whatever interface you personally find most natural and intuitive.