|
Boost Users : |
Subject: [Boost-users] Boost.Signals2 - tracking an object managed with tr1::shared_ptr
From: Monteleone, Nathan (nathan.monteleone_at_[hidden])
Date: 2009-09-10 19:06:48
Is it possible to use slot::track with a tr1::shared_ptr instead of a boost::shared_ptr?
For example:
std::tr1::shared_ptr<MyObject> o;
typedef boost::signals2::signal<void(void)> SigType;
SigType s;
// Error: can't convert std::tr1::shared_ptr<MyObject> to boost::weak_ptr...
s.connect(SigType::slot_type(&MyObject::function, o.get()).track(o));
According to the docs you HAVE to use boost::shared_ptr. I'm just hoping there's some traits specialization or something I can provide so that I can get away with using the tr1 version instead (all our code is already written with tr1).
Thanks!
-Nathan
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