Boost signals2 and std::shared_ptr?

228 views Asked by At

Is it possible to configure (at compile time) boost::signals2 to use std::shared_ptr instead of boost::shared_ptr, for e.g. in calls like boost::signals2::deconstruct?

I am using boost 1.68

1

There are 1 answers

0
sehe On

Without looking into it, I can guess that the answer will be "no" since changing it would change the interface types, which invites all manner of ODR violations and, thereby, hairy bugs.

However, if you have to bridge the divide, you can sometimes your std::shared_ptr inside a boost::shared_ptr (or vice versa): Cohabitation of boost::shared_ptr and std::shared_ptr