Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我没有找到完全相同的问题。
有没有办法转换a:
std::vector<boost::shared_ptr<T>>
进入非安全版本:
std::vector<T*>
不对原始向量的每个元素执行 for 循环并使用 .get() ?
std::transform(safe.begin(), safe.end(), std::back_inserter(unsafe), boost::bind(&boost::shared_ptr<T>::get, _1));