Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 1999-11-21 14:50:26

> I have found a slightly different form to be useful in my programming. I
> originally used Nathan's code, but added typedef's for the template
> parameters, the capability of letting Member be a reference type, and a
> specialization for swap (if Member has specialized swap for efficiency, that
> specialization is lost in the original, even if Base is empty). Lastly, for
> convenience, I added three additional constructors. I chose to use the name
> "empty_member".

My thoughts after reading the enclosed code:

    Like Beman, I prefer the name "member" to "m".

    In the specialization of swap, I'd prefer a C++-style static_cast to the
C-style one, "(Base&)". I want to be able to turn on the "warning on C-style
cast" option that's already available in GCC, and I don't want any Boost
headers to trigger that warning.

    I suggest we remove the empty inline destructor definition. Does the it
make things more efficient? When I tested it with the compilers I use, it
made no difference in the code generated. If it doesn't make things any
better, I'd prefer to omit it.

    -- Darin

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