Proxy to hide singleton implementation
Without locking, this works for me:

class proxy
{
public:
    proxy()
      : m_impl(make_impl()) {}

    void method()
    {
        m_impl.method();
    }
private:
    struct Impl
    {
        Impl() {}
        ~Impl() {}
        void method() {}
    };

    Impl&amp; m_impl;
    Impl&amp; make_impl()
    {
        static Impl impl;
        return impl;
    }
};


When locking, you need to synchronize access to the static impl in make_impl and you need to secure the call to m_impl.method().