【发布时间】:2016-07-22 01:52:06
【问题描述】:
shared_ptr 观察者 20.8.2.2.5 C++14 最终草案 (n4296)
long use_count() const noexcept;返回:
shared_ptr对象的数量,包括*this,与*this共享所有权,或者当*this为空时为0。[注意:
use_count()不一定有效。 ——尾注]
【问题讨论】:
-
我想知道如果计数超过
LONG_MAX,定义的行为是什么 -
我猜到那个时候软件已经被其他方面搞砸了
标签: c++ c++14 shared-ptr