dimanche 30 août 2015

Why isn't std::shared_ptr::owner_before noexcept?

I was reading through the interfaces for std::shared_ptr and std::weak_ptr and noticed that almost every member function had at least one overload that was noexcept. Upon further reading, however, I found that neither std::shared_ptr::owner_before nor std::weak_ptr::owner_before could provide this guarantee.

Why can neither shared_ptr nor weak_ptr offer the noexcept guarantee in the method owner_before?

Aucun commentaire:

Enregistrer un commentaire