$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: rogeeff (rogeeff_at_[hidden])
Date: 2002-02-23 17:47:42
--- In boost_at_y..., "Mark Rodgers" <mark.rodgers_at_c...> wrote:
> I've uploaded an initial version of auto_sequence to
>
> http://groups.yahoo.com/group/boost/files/auto_sequence.zip
>
> This follows Dave Abrahams's suggestion of turning my auto_vector
> into a container adapter.
>
> You can use it like this (oh for typedef templates):
>
> boost::auto_deque<foo>::type x;
> boost::auto_list<foo>::type y;
> boost::auto_vector<foo>::type z;
>
> Which are equivalent to
>
> boost::auto_sequence< std::deque<foo*> > x;
> boost::auto_sequence< std::list<foo*> > y;
> boost::auto_sequence< std::vector<foo*> > z;
>
> If you have some other sequence you wish to use, you could use
>
> boost::auto_sequence< my_nifty_sequence<foo*> > w;
>
> I've gone for the simple/unsafe approach of allowing you to modify
> the contained values:
>
> z[0] = new foo; // Whoops - memory leak.
>
> so Don't Do That. Personally I've never accidentally done this in
> many years of using similar "auto" containers so I don't think it
> is a problem. If anyone has strong opinions on whether there is
> a better alternative, please speak up.
>
> Please let me know if you think this, or something close to it,
> is worthy of documentation and submission.
>
> Thanks
> Mark
Why did you choose private inheritance? Why not public abd eliminate
all forwarding function?
Gennadiy.