在 C++11 和草案 C++14 中,解引用运算符 (operator*
和operator->
)shared_ptr
都是noexcept
. 但是对于unique_ptr
,operator->
是noexcept
, 但operator*
不是。为什么不是operator*
for unique_ptr
noexcept
(或者,为什么是operator*
for shared_ptr
noexcept
)?
问问题
129 次