|
Boost : |
From: Michael Nicolella (boost_at_[hidden])
Date: 2006-07-19 16:01:44
I think you could create an allocator that took this 'runtime size' as a
constructor parameter, and return that value for the allocator's .max_size()
member function.
-----Original Message-----
From: Sohail Somani [mailto:s.somani_at_[hidden]]
Sent: Wednesday, July 19, 2006 12:59 PM
To: boost_at_[hidden]
Subject: Re: [boost] boost::array support for runtime-sized arrays
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Steven Burns
> Sent: Wednesday, July 19, 2006 12:56 PM
> To: boost_at_[hidden]
> Subject: [boost] boost::array support for runtime-sized arrays
>
> I realize you could simply use std::vector, but sometimes all
> you want is a
> fixed-size array (but sized at runtime). Besides, I am not
> sure about the
> overhead involved with std::vector for these simple scenarios.
I doubt it would be much more if at all slower to use vector so long as
you only allocate once.
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk