Constructors
Synopses
Declared in <bslstl_function.h>
Create an empty function that does not target any callable.
function() noexcept;
Create a function with a copy of the target held by original.
Create an empty function that does not target any callable.
function(nullptr_t unused) noexcept;
Create a function by moving the target from the specified original.
function(BloombergLP::bslmf::MovableRef<function> original) noexcept;
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;
Create an empty function using the specified allocator.
function(
std::allocator_arg_t allocatorArg,
allocator_type const& allocator) noexcept;
Create an empty function object using the specified allocator.
function(
std::allocator_arg_t allocatorArg,
allocator_type const& allocator,
nullptr_t unused) noexcept;
Create a function by moving from original using allocator.
function(
std::allocator_arg_t allocatorArg,
allocator_type const& allocator,
BloombergLP::bslmf::MovableRef<function> original);
Create a function copying original using the specified allocator.
function(
std::allocator_arg_t allocatorArg,
allocator_type const& allocator,
function const& original);
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;
Parameters
Name |
Description |
original |
function whose target is copied |
unused |
null pointer literal selecting the empty state |
func |
callable object to wrap as the target |
allocatorArg |
allocator‐argument tag (unused) |
allocator |
allocator used to supply memory |
Created with MrDocs