Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
grammar::recycled_ptr::recycled_ptr (2 of 6 overloads)

Constructor.

Synopsis
recycled_ptr(
    recycled< T >& bin,
    std::nullptr_t);
Description

After construction, this is empty and refers to the specified recycle bin.

Example
static recycled< std::string > [link url.ref.boost__urls__grammar__recycled_ptr.bin `bin`];

recycled_ptr< std::string > ps( [link url.ref.boost__urls__grammar__recycled_ptr.bin `bin`], nullptr );

// Acquire a string and put it into a known state
ps->acquire();
ps->clear();
Postconditions
&this->[link url.ref.boost__urls__grammar__recycled_ptr.bin `bin`]() == &[link url.ref.boost__urls__grammar__recycled_ptr.bin `bin`] && this->[link url.ref.boost__urls__grammar__recycled_ptr.empty `empty`]()
Exception Safety

Throws nothing.

Parameters

Name

Description

bin

The recycle bin to use

See Also

acquire, recycled, release.


PrevUpHomeNext