Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2005-02-28 05:09:01

On Mon, 28 Feb 2005 08:27:10 +0000, Jonathan Wakely wrote
> I'm certainly not dogmatic about it and wouldn't turn my nose up at your
> date-time example, I think it makes sense in that case. Christopher
> asked about macros to help derive from STL containers specifically, which
> I do think is usually a bad idea and not something to be encouraged
> by a Boost library that makes it easy (IMHO).

Yes, I agree -- sorry if my example took us off the original topic...

> There are some
> situations, such as Christopher's PwC library, where it might be OK,
> but I think those situations are rare.


> Why do the convenience functions have to be member functions? If you
> inherit from STL containers you can't be making use of any protected
> functions or data, since that would rely on details of a particular STL
> implementation.

Well, they wouldn't have to be, but attaching them to the collection class
makes it trivial to see that those functions manipulate the collection and
that's it. If the functions are floating free you might presume they are
reuseable in a broader context.
> You might have good use cases for doing it and know what you're
> doing, but there are plenty of programmers out there who don't.

True enough...


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