...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Constructor.
template< class DeducedHandler, class... Args> handler_ptr( DeducedHandler&& handler, Args&&... args);
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&&...)
Strong guarantee.
Name |
Description |
---|---|
|
The handler to associate with the owned object. The argument will be moved if it is an xvalue. |
|
Optional arguments forwarded to the owned object's constructor. |