Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext
handler_ptr::handler_ptr (4 of 4 overloads)

Constructor.

Synopsis
template<
    class DeducedHandler,
    class... Args>
handler_ptr(
    DeducedHandler&& handler,
    Args&&... args);
Description

This creates a new container with an owned object of type T. The allocator associated with the handler will be used to allocate memory for the owned object. The constructor for the owned object will be called with the following equivalent signature:

T::T(Handler const&, Args&&...)
Exception Safety

Strong guarantee.

Parameters

Name

Description

handler

The handler to associate with the owned object. The argument will be moved if it is an xvalue.

args

Optional arguments forwarded to the owned object's constructor.


PrevUpHomeNext