
23 Aug
2011
23 Aug
'11
noon
On 23/08/2011 09:44, John Maddock wrote:
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?
Isn't MSVC the only one that doesn't do it. And MSVC11 does it, I believe.