bsl::function::function

Constructors

Synopses

Declared in <bslstl_function.h>

Create an empty function that does not target any callable.

function() noexcept;
» more...

Create a function with a copy of the target held by original.

function(function const& original);
» more...

Create an empty function that does not target any callable.

function(nullptr_t unused) noexcept;
» more...

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

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

Create a function wrapping the specified func callable object.

template<class FUNC>
function(FUNC&& func)
requires ! IsReferenceCompatible<typename Decay<FUNC>::type,
                                            function>::value
                 &&   IsInvocableWithPrototype<
                                             typename Decay<FUNC>::type>::value;
» more...

Create an empty function using the specified allocator.

function(
    std::allocator_arg_t allocatorArg,
    allocator_type const& allocator) noexcept;
» more...

Create an empty function object using the specified allocator.

function(
    std::allocator_arg_t allocatorArg,
    allocator_type const& allocator,
    nullptr_t unused) noexcept;
» more...

Create a function by moving from original using allocator.

function(
    std::allocator_arg_t allocatorArg,
    allocator_type const& allocator,
    BloombergLP::bslmf::MovableRef<function> original);
» more...

Create a function copying original using the specified allocator.

function(
    std::allocator_arg_t allocatorArg,
    allocator_type const& allocator,
    function const& original);
» more...

Create a function wrapping func using the specified allocator.

template<class FUNC>
function(
    std::allocator_arg_t allocatorArg,
    allocator_type const& allocator,
    FUNC&& func)
requires ! IsReferenceCompatible<typename Decay<FUNC>::type,
                                            function>::value
                 &&   IsInvocableWithPrototype<
                                             typename Decay<FUNC>::type>::value;
» more...

Parameters

NameDescription
originalfunction whose target is copied
unusednull pointer literal selecting the empty state
funccallable object to wrap as the target
allocatorArgallocator-argument tag (unused)
allocatorallocator used to supply memory