[#boost-urls-grammar-recycled_ptr-2constructor] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::xref:boost/urls/grammar/recycled_ptr.adoc[recycled_ptr]::recycled_ptr :relfileprefix: ../../../../ :mrdocs: Constructor == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/recycled.hpp#L208[boost/url/grammar/recycled.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:boost/urls/grammar/recycled_ptr/2constructor-08.adoc[recycled_ptr](xref:boost/urls/grammar/recycled.adoc[recycled]<T>& bin); ---- [.small]#xref:boost/urls/grammar/recycled_ptr/2constructor-08.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/grammar/recycled_ptr/2constructor-0ac.adoc[recycled_ptr]( xref:boost/urls/grammar/recycled.adoc[recycled]<T>& bin, std::nullptr_t) noexcept; ---- [.small]#xref:boost/urls/grammar/recycled_ptr/2constructor-0ac.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/grammar/recycled_ptr/2constructor-056.adoc[recycled_ptr](); ---- [.small]#xref:boost/urls/grammar/recycled_ptr/2constructor-056.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/grammar/recycled_ptr/2constructor-05e.adoc[recycled_ptr](std::nullptr_t) noexcept; ---- [.small]#xref:boost/urls/grammar/recycled_ptr/2constructor-05e.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/grammar/recycled_ptr/2constructor-0ab.adoc[recycled_ptr](xref:boost/urls/grammar/recycled_ptr.adoc[recycled_ptr] const& other) noexcept; ---- [.small]#xref:boost/urls/grammar/recycled_ptr/2constructor-0ab.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/grammar/recycled_ptr/2constructor-0f.adoc[recycled_ptr](xref:boost/urls/grammar/recycled_ptr.adoc[recycled_ptr]&& other) noexcept; ---- [.small]#xref:boost/urls/grammar/recycled_ptr/2constructor-0f.adoc[_» more..._]# == Description Upon construction, this acquires exclusive access to an object of type `T` which is either recycled from the specified bin, or newly allocated. The object is in an unknown but valid state. === Example [,cpp] ---- static recycled< std::string > bin; recycled_ptr< std::string > ps( bin ); // Put the string into a known state ps->clear(); ---- === Postconditions [,cpp] ---- &this->bin() == &bin && ! this->empty() ---- == Parameters |=== | Name | Description | *bin* | The recycle bin to use | *other* | The pointer to copy |=== == See Also xref:boost/urls/grammar/recycled.adoc[recycled]. [.small]#Created with https://www.mrdocs.com[MrDocs]#