| Technical Specification | ||||
| Filesystem library(filesystem TS) | ||||
| Library fundamentals(library fundamentals TS) | ||||
| Library fundamentals 2(library fundamentals TS v2) | ||||
| Library fundamentals 3(library fundamentals TS v3) | ||||
| Extensions for parallelism(parallelism TS) | ||||
| Extensions for parallelism 2(parallelism TS v2) | ||||
| Extensions for concurrency(concurrency TS) | ||||
| Extensions for concurrency 2(concurrency TS v2) | ||||
| Concepts(concepts TS) | ||||
| Ranges(ranges TS) | ||||
| Reflection(reflection TS) | ||||
| Mathematical special functions(special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
| Member functions | ||||
| Non-member functions | ||||
experimental::static_pointer_castexperimental::dynamic_pointer_castexperimental::const_pointer_castexperimental::reinterpret_pointer_cast | ||||
Members and non-members identical to those ofstd::shared_ptr |
template<class T,class U> std::experimental::shared_ptr<T> | (1) | (library fundamentals TS) |
template<class T,class U> std::experimental::shared_ptr<T> | (2) | (library fundamentals TS) |
template<class T,class U> std::experimental::shared_ptr<T> | (3) | (library fundamentals TS) |
template<class T,class U> std::experimental::shared_ptr<T> | (4) | (library fundamentals TS) |
Creates a new instance ofstd::experimental::shared_ptr whose stored pointer is obtained fromr's stored pointer using a cast expression. Ifr is empty, so is the newshared_ptr (but its stored pointer is not necessarily null).
Otherwise, the newshared_ptr will share ownership withr, except that it is empty if thedynamic_cast performed bydynamic_pointer_cast returns a null pointer.
LetY betypenamestd::experimental::shared_ptr<T>::element_type, then the resultingstd::experimental::shared_ptr's stored pointer will be obtained by calling (in respective order):
dynamic_cast is a null pointer value, the returnedshared_ptr will be empty).The behavior of these functions is undefined unless the corresponding cast fromU* toT* is well formed:
| r | - | the pointer to convert |
| This section is incomplete Reason: no example |
constructs newshared_ptr(public member function)[edit] | |
| appliesstatic_cast,dynamic_cast,const_cast, orreinterpret_cast to the stored pointer (function template)[edit] |