7

In C++11 and draft C++14, the dereferencing operators (operator* and operator->) for shared_ptr are both noexcept. But for unique_ptr, operator-> is noexcept, but operator* isn't. Why isn't operator* for unique_ptr noexcept (or, alternatively, why is operator* for shared_ptr noexcept)?

KnowItAllWannabe
  • 12,972
  • 8
  • 50
  • 91

0 Answers0