简体   繁体   中英

Boost signals2 and std::shared_ptr?

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

I am using boost 1.68

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM