阅读背景:

如何迭代shared_ptr对象序列?

来源:互联网 

This is more a styling than performance question. I have just converted (most of) my pointers to shared_ptr objects, and have reluctantly come to accept weak_ptrs as alternatives to raw pointers. My question is, what is the preferred method of iterating through a sequence (let's say a vector) of shared pointer objects? Here is what I've been doing:This is more a styling than performance questio




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: