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 (3 of 4 overloads)

Construct a new handler_ptr.

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

This creates a new handler_ptr 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 thusly:

T(handler, std::forward<Args>(args)...)
Parameters

Name

Description

handler

The handler to associate with the owned object. The argument will be moved.

args

Optional arguments forwarded to the owned object's constructor.


PrevUpHomeNext