Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2004-10-02 11:11:44

> I think you misunderstood what Gennadiy meant. (If not, I think
> this is a good idea, anyway.) Your function should accept an
> output iterator through which you save the results. That enables
> the caller to decide where the results go instead of you deciding
> that they go into a list which then must be iterated. Thus, I'm
> proposing something like this:
> template <typename OutIt, typename Char>
> OutIt
> glob(OutIt & out, std::basic_string<Char> const & pattern,
> filesystem::path const & pathname, glob_flags flags);

I don't think I ever suggested this. Plain iterator is what I meant. How
would I iterate using above interface?

> Appropriate output iterators can forward the matches to a
> collection, to a GUI control, to a file, etc.
> > It works, but is considerably slower than the function returning a list.
> > doubt profiling will help track down what I'm doing inefficiently.
> No doubt.

I do not see anything in iterator implementation that suggest inherent

> --
> Rob Stewart stewart_at_[hidden]


Boost list run by bdawes at, gregod at, cpdaniel at, john at