Component‐private base providing representation and call operator for bsl::function.

Synopsis

Declared in <bslstl_function.h>

template<
    class RET,
    class... ARGS>
class Function_Variadic<RET(ARGS...)>
    : public Function_ArgTypes<RET(ARGS...)>

Description

This component‐private class template contains the physical representation and provides the variadic interfaces for bsl::function (see class and component documentation for bsl::function). bsl::function publicly inherits from an instantiation of this template. This implementation class exists to 1) minimize the amount of variadic template expansion required in C++03 using the sim_cpp11_features.pl utility and 2) work around issues with the Sun CC compiler, which has trouble with argument type deduction when a template argument has a partial specialization (as Function_Variadic does). bsl::function does not have a partial specialization and delegates to the Function_Variadic base class only those parts of the interface and implementation that depend on decomposing the function prototype into a return type and variadic list of argument types.

Base Classes

Name

Description

Function_ArgTypes<RET(ARGS...)>

Component‐private metafunction providing nested argument typedefs for bsl::function.

Type Aliases

Name

Description

allocator_type

This typedef is an alias to the allocator type of the representation.

result_type

This typedef is an alias to the return type of PROTOTYPE.

Member Functions

Name

Description

Function_Variadic [constructor]

Create an empty object using the specified allocator.

operator()

Invoke the target with args..., or throw if this object is empty.

Protected Data Members

Name

Description

d_rep

Non‐templated representation of this function wrapper.

Friends

Name

Description

bsl::function

Forward declaration.

Created with MrDocs