
26 Jan
2010
26 Jan
'10
9:12 p.m.
Frank Mori Hess a écrit :
One of the motivations for the singleton pattern is making it impossible to instantiate more than one instance of the class, which something which is unintrusive cannot accomplish. Maybe I'm missing something however, as I don't see the point of boost::global<T> at all?
I spoke too quickly (in truth, I don't care about singletons, so I didn't pay too much attention). Both approaches have their merits. In any case the difference isn't just a matter of taste.