While implementing a basic std library for my hobby OS I came across this and wondered why:
Both operator->()
and T* get()
are marked as noexcept, however operator*()
is not. According to the reference it should be equivalent to *get()
, which would allow it to be noexcept
and looking at some implementations I see no reason why it is not.
Why is unique_ptr
's dereferencing operator not marked as noexcept
?