From: Dan Nuffer (dnuffer_at_[hidden])
Date: 2002-02-05 11:23:49
Synge Todo wrote:
> Dear Boosters,
> I've just uploaded my new version of fixed_capacity_vector and others:
> The changes made after the last version is as follows:
> * Added fixed_capacity_deque class (fixed-capacity version of std::deque).
> * Added fixed_capacity_stack and fixed_capacity_queue implemented as
> wrappers on fixed_capacity_vector or fixed_capacity_queue.
> * Optimized constructors, assignment, and insertion.
> * Added documents.
> * Added sample and test codes.
> I have checked that the sample programs compile by KAI CC (KCC 4.0f3,
> Linux), Intel C++ (icc 5.0.1, Linux), GNU g++ (3.0.2, Linux), SGI
> MIPSpro (CC 18.104.22.168m with clibs and also with
> -DBOOST_NO_TEMPLATED_TEMPLATE_PARAMETER), and Compaq C++ (cxx 6.3,
> Digital UNIX), and that they produce expected outputs.
> Any comments/suggestions are welcome.
I think this is great! I verified that all the examples compile and run
okay with gcc 2.95.2 on Linux.
Just one question. Why did you make capacity() and max_size() be
static? If they're static, a generic algorithm that relies on calling
either one would not work with for both a std::vector and a
p.s. Here's the results of running the timing.cpp program (compiled with
allocating 2097152 short vectors of length 4
fixed_capacity_vector 0.89 sec
std::vector 3.17 sec
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk