Boost logo

Boost :

From: Matt Calabrese (rivorus_at_[hidden])
Date: 2005-10-27 11:48:23

On 10/27/05, Victor A. Wagner Jr. <vawjr_at_[hidden]> wrote:
> OK, fix the core language so that I don't have to write the whole
> batch of forwarding functions, AND I get the new ones automatically
> when std::vector gets updated!!
> No??? don't wanna do that?
> then it ISA std::vector<> (or whatever STL collection I choose)!!

Don't use an IS-A relationship just because you want to save time typing.
Use an IS-A relationship if IS-A makes sense. If you really always want all
of vector's operations exposed without additional typing, then just
encapsulate it and make it public. If you want the member functions to be a
direct part of the encapsulating class, then use private inheritance and
promote the member functions and types from the vector base class to your
type's public interface with using-delcarations.

-Matt Calabrese

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