I want to fill a container inside a function by passing an output iterator, since this is the most efficient way to do this, as I understand it. eg.
template <typename OutputIterator> void getInts(OutputIterator it) { for (int i = 0; i < 5; ++i) *it++ = i; }
( Is returning std :: list expensive? )
But how can I apply the type that the iterator should refer to? Basically I want to say that "this function accepts an output iterator of type boost :: tuple".
source share