Boost logo

Boost Users :

Subject: [Boost-users] [Singleton] When CRTP won't work
From: Alexander (gutenev_at_[hidden])
Date: 2009-01-16 10:04:25


The current version of Boost candidate Signelton as well as other
implementation is CRTP base.
However, one may want to use it as local class

my_class& get_something(std::string const& param)
{
   struct local : singleton<local>
   {
      ...
   };
   return local::instance->some_method(param);
}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net