Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,685 of 33,346    |
|    Balog Pal to All    |
|    Re: Singletons    |
|    24 Nov 12 10:52:39    |
      From: pasa@lib.hu              On 11/22/2012 6:26 AM, Daniel Krügler wrote:       > I also don't see how you can compile-time enforce the       > essential invariant of a singleton - namely that only one object of       > type X exists.              Err, what makes that an attribute of a singleton? And what possible       benefits could that create?              Signeton is an *object* that is accessible from anywhere in the       application, and *that* instance is surely the same.              Like std::cout, cerr are proper singletons. But they share a class, and       you can have any number of other ostreams.                     --        [ See http://www.gotw.ca/resources/clcm.htm for info about ]        [ comp.lang.c++.moderated. First time posters: Do this! ]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca