Why not the * operator for unique_ptr noexcept?

In C ++ 11 and the C ++ 14 project, dereference operator* ( operator* and operator-> ) for shared_ptr are noexcept . But for unique_ptr , operator-> there is noexcept , but operator* not. Why not operator* for unique_ptr noexcept (or, alternatively, why operator* for shared_ptr noexcept )?

+7
c ++ c ++ 11 noexcept smart-pointers c ++ 14
source share

No one has answered this question yet.

See similar questions:

33
Why doesn't the operator std :: unique_ptr * throw and operator-> throw away?

or similar:

23498
Why is processing a sorted array faster than processing an unsorted array?
8499
What is the "->" operator in C ++?
2437
Why "use the std namespace;" considered bad practice?
2116
Why are stigment additions much faster in individual cycles than in a combined cycle?
1994
What are the basic rules and idioms for operator overloading?
1483
Why should I use the pointer and not the object itself?
461
When should I really use noexcept?
343
Why doesn't Java offer operator overloading?
31
Why is std :: unique_ptr :: reset () always noexcept?
nine
Why is the unique_ptr * operator not excluded?

All Articles