Create a function by moving the target from the specified original.

Synopsis

Declared in <bslstl_function.h>

function(BloombergLP::bslmf::MovableRef<function> original) noexcept;

Description

Create a function having the same target as the specified original object. Use original.get_allocator() as the allocator to supply memory. The original object is set to empty after the new object is created. If the target qualifies for the small‐object optimization (see class‐level documentation), then it is move‐constructed into the new object; otherwise ownership of the target is transferred without using the target's move constructor.

Parameters

Name

Description

original

function whose target is moved into this object

Created with MrDocs