|
Boost : |
Subject: Re: [boost] Review Request: Singularity
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-08-23 03:44:14
> Apart from that I'm afraid I don't really see the point of this against
>
> struct my_singleton
> {
> private:
> my_singleton() {}
> my_singleton(const my_singleton&);
>
> public:
> static my_singleton& instance()
> {
> static my_singleton ins;
> return ins;
> }
> };
>
> which is simple, short, fast to compile, and thread-safe.
Not thread safe on the majority of compilers surely?
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk