Boost logo

Boost :

From: rogeeff (rogeeff_at_[hidden])
Date: 2002-01-11 12:15:24


--- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
>
> ----- Original Message -----
> From: "Andrei Alexandrescu" <andrewalex_at_h...>
> To: <boost_at_y...>
> Sent: Friday, January 11, 2002 11:52 AM
> Subject: Re: [boost] Loki SmartPtr study: Policy orthogonality
issues
>
>
> > > I don't understand what you're saying. This sounds like an
argument for
> > > functional programming in general (all data is const) ???
> > >
> > > Doesn't the shared_array as owning iterator make sense to you?
> >
> > The idea is that shared_array points to the beginning of an array
> allocated
> > with new.
>
> Clearly, that's not the idea if you want to allow pointer
arithmetic on it.
>
> > Then, you don't want to alter it because the restructor will call
> > delete[] on the pointee object, which must be there.
>
> yes, the pointer to the base of the array must be available
somewhere. Peter
> is storing it in the count object.

What is an advantage in mixing 2 independent concepts: resource
management and iterator into one implementation?

You can always implement owning iterator using existent smart_array
implementation.

Gennadiy.


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