#include <cstdio>

#include <tr1/memory>
#include <tr1/functional>

#include <sigc++/sigc++.h>

#include <boost/enable_shared_from_this.hpp>

class Klass
   : //public boost::enable_shared_from_this<Klass>,
     public sigc::trackable
{
public:
   ~Klass() { printf("~Klass %p\n", this); }
   void Method() { printf("Method: %p\n", this); }
};

int main(int argc, const char *argv[])
{
   sigc::slot<void> s;

   {
      std::tr1::shared_ptr<Klass> obj(new Klass());
      s = sigc::mem_fun(obj.get(), &Klass::Method);
   }

   s();

   return 0;
}
