Boost logo

Boost :

Subject: Re: [boost] [Boost.utility]
From: GMan (gmannickg_at_[hidden])
Date: 2010-01-26 15:22:29


Stewart, Robert wrote:

> That's easier said than done. There are many developers writing code that
do whatever works. If the class permits creating multiple instances,
they'll do regardless of whether it's good for them. If the class prevents
being used in other than the prescribed manner, then they can't do the wrong
thing.

While I don't support such programming habits...fine, I'll take that as a
point.

The rest of my post was this:

Take your best singleton class, but remove the bit where it intrudes and
forces only a single instantiation. Call this "global", which provides the
same thing as a singleton but allows other instantiations of the class. My
argument was that this class is more worth boost's time than the singleton
class. The reason being, users of global could always re-introduce the
single-instantiation behavior, but don't have to. This provides more
flexibility.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk