Generic way to return a whole collection
Generic way to return a whole collection
In C++, what is the best way to return a collection to client code without using iterators.
Let’s say iterators are ruled out because eg the collection is remote. I’d like a signature for a function that returns the collection in the most useful form possible.
By ‘best’, I mean the best trade-off between clarity and genericity.
My instinct was (where result.push_back(obj) is valid C++):
templa…
View On WordPress









