Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-10-21 05:51:36

----- Original Message -----
From: "Aleksey Gurtovoy" <agurtovoy_at_[hidden]>

> Dan Nuffer wrote:
> > As the author of multi_pass, I had originally envisioned submitting
> > it separate from spirit. But, one day I realized that I couldn't
> > think of a use for it outside of spirit. Maybe I'm just not
> > imaginitive enough! But, I personally never had the need to convert
> > an input iterator into a forward iterator, other than with spirit.
> Here is an easy use case - one wants to know how many elements are in the
> input sequence _before_ the actual processing happens, even if at the cost
> of additional iteration through the sequence:
> template< typename Iterator >
> void do_input(Iterator first, Iterator last)
> {{
> multi_pass<Iterator> first(first);
> multi_pass<Iterator> last(last);
> std::size_t size = std::distance(first, last);
> // using size/fist/last...
> }}
> > So, if there is some interest, I'll submit it.
> I thought it's being submitted as a part of Spirit anyway ;). IMO it's
> definitely should be factored out into a standalone mini-library.

If multi_pass is updated to support bidirectional iterators,
regex will benefit from it as well. I think there are lots of uses
for the multi_pass.


{{ Aleksey, any reason for the double braces? Looks cool, IMO }}

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