Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-30 14:32:46


"Thorsten Ottosen" <nesotto_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:uu15r5z80.fsf_at_boost-consulting.com...
>> "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
>>
>> >> This container type is a burden which has to be taken everywhere. While
> currently,
>> >> if an algorithm needs to use iterator_range, it can be parametric only
> in regards,
>> >> to an iterator, basic_substring needs also a container.
>> >
>> > there not much difference; a container can exist without an iterator;
> the
>> > converse is not true.
>>
>> Wha???
>> int x[] = {1, 2, 3};
>> int* iterator = x;
>
> then you could think of the array as the container.

For some very loose non-standard definition of "container".

> Anyway, it doesn't hold for something like counting_iterator, but
> they are not quite relevant in a string library, are they?

It's very easy to imagine iterator ranges with no externally-visible
"container" for which string algorithms might be appropriate.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk