[#boost-urls-grammar-recycled_ptr] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::recycled_ptr :relfileprefix: ../../../ :mrdocs: A pointer to a shared instance of T == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/recycled.hpp#L148[boost/url/grammar/recycled.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class T> class recycled_ptr; ---- == Member Functions [cols=2] |=== | Name | Description | xref:boost/urls/grammar/recycled_ptr/acquire.adoc[`acquire`] | Return the referenced object | xref:boost/urls/grammar/recycled_ptr/bin.adoc[`bin`] | Return the referenced recycle bin | xref:boost/urls/grammar/recycled_ptr/empty.adoc[`empty`] | Return true if this does not reference an object | xref:boost/urls/grammar/recycled_ptr/get.adoc[`get`] | Return the referenced object | xref:boost/urls/grammar/recycled_ptr/2conversion.adoc[`operator bool`] | Return true if this references an object | xref:boost/urls/grammar/recycled_ptr/operator_star.adoc[`operator*`] | Return the referenced object | xref:boost/urls/grammar/recycled_ptr/operator_ptr.adoc[`operator‐>`] | Return the referenced object | xref:boost/urls/grammar/recycled_ptr/operator_assign.adoc[`operator=`] | Assignment | xref:boost/urls/grammar/recycled_ptr/2constructor.adoc[`recycled_ptr`] [.small]#[constructor]# | Constructor | xref:boost/urls/grammar/recycled_ptr/release.adoc[`release`] | Release the referenced object | xref:boost/urls/grammar/recycled_ptr/2destructor.adoc[`~recycled_ptr`] [.small]#[destructor]# | Destructor |=== == Description This is a smart pointer container which can acquire shared ownership of an instance of `T` upon or after construction. The instance is guaranteed to be in a valid, but unknown state. Every recycled pointer references a valid recycle bin. === Example [,cpp] ---- static recycled< std::string > bin; recycled_ptr< std::string > ps( bin ); // Put the string into a known state ps->clear(); ---- == Template Parameters |=== | Name | Description | *T* | the type of object to acquire, which must be _DefaultConstructible_. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#