Lars Gullik Bjønnes wrote:

> Andre Poenitz <[EMAIL PROTECTED]> writes:
> 
> | Statics in a single file will be destructed in last-to-first
> | order.
> 
> One problem is still that several of the global varialbes cannot be
> static, they need more information before they can be initialized.
> That is easily solved with a class.

Or by an accessor function:

boost::scoped_ptr<Controllers> controllers_;

Controllers const & controllers() {
        if (!controllers_.get())
                controllers_.reset(new Controllers);
        return *controllers_.get();
}

-- 
Angus

Reply via email to