Boost logo

Boost :

From: Darryl Green (green_at_[hidden])
Date: 2002-02-07 19:31:54

> -----Original Message-----
> From: Andrei Alexandrescu [mailto:andrewalex_at_[hidden]]
> > However,
> > I myself have definite needs of such a container right now,
> and could
> > use the fixed_capacity_vector for those now.
> That's cool; for that, the classes you use don't have to be in boost.
> > On the other hand the
> > policy based vector is at the moment an idea without any plans for a
> > concrete implementation?
> I pointed two categories of problems with
> fixed_capacity_vector: one is
> design-related, the other refers to the implementation. You
> comment on the
> design side of things only. At least I think the
> implementation of that
> limited design ought to be up to snuff. It is not.

Wouldn't it be a good idea to have a group, such as boost, review the design
and implementation to allow identification of where improvements are
required? Hopefully this would be done in a constructive way allowing the
author, kindly reviewers, or potential users like Dylan or myself to make
the improvements. I thought I had also noticed that boost was quite prepared
to treat interface as more important than implementation in that the
(initial) implementation is an example/proof of implementability (is that a
word?). Obviously the implementation needs to implement what the interface
claims to be - does the implementation of fixed_capacity_vector fail to do
this in some way?
That said, the implementation does seem to work (it definitely needs fixing
to avoid initialisation with default constructed objects though), if that
were done, I'd use it now. Surely it would be better to do so than use some
array class, or rolling my own or....
> > After all I need to get work done and cannot always wait
> for the nicest
> > solution and don't mind rewriting a few lines in my codes
> in the future
> > if there's a better solution a couple of years from now.
> If all would be like you, the world would be a better place :o).

If in a few years from now we have templated typedefs won't this be
completely painless (a no-op) so long as the interface for
fixed_capacity_vector is the same as the interface for
container_with_traits<std::vector, however_you_specify_fixed_capacity> (or
whatever it looks like)?
Is there something about the interface that precludes this? If there is,
shouldn't it be raised in a review?

Boost list run by bdawes at, gregod at, cpdaniel at, john at