-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 10 September 2009, Monteleone, Nathan wrote:
Is it possible to use slot::track with a tr1::shared_ptr instead of a boost::shared_ptr?
Sorry, not at present. I've thought about it a bit, especially with respect to std::shared_ptr, but haven't gotten around to doing anything about it. It wouldn't be too hard to support some fixed set of shared_ptr types using boost::variant. Maybe an additional slow path that uses heap allocation and some type traits could support unforeseen shared_ptr types.
For example:
std::tr1::shared_ptr<MyObject> o; typedef boost::signals2::signal
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). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkqqe2cACgkQ5vihyNWuA4Ux8QCgkBLWJPceO9MhKWqHMlp3GeWA MusAoOChRRFcOaIz/WuJY6mN644bVB5p =uH2d -----END PGP SIGNATURE-----