cpp/experimental/shared ptr/pointer cast

Creates a new instance of std whose stored pointer is obtained from 's stored pointer using a cast expression. If is empty, so is the new  (but its stored pointer is not necessarily null).

Otherwise, the new will share ownership with, except that it is empty if the  performed by  returns a null pointer.

Let be, then the resulting std's stored pointer will be obtained by calling (in respective order):

@1@ . @2@ (If the result of the  is a null pointer value, the returned  will be empty). @3@ . @4@.

The behavior of these functions is undefined unless the corresponding cast from to  is well formed:

@1@ The behavior is undefined unless is well formed. @2@ The behavior is undefined unless is well formed. @3@ The behavior is undefined unless is well formed. @4@ The behavior is undefined unless is well formed.