Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions | Protected Attributes | Friends

bslstl::Function_Variadic< RET(ARGS...)> Class Template Reference

#include <bslstl_function.h>

Inheritance diagram for bslstl::Function_Variadic< RET(ARGS...)>:
bslstl::Function_ArgTypes< RET(ARGS...)>

List of all members.

Public Types

typedef RET result_type
typedef
Function_Rep::allocator_type 
allocator_type

Public Member Functions

 Function_Variadic (const allocator_type &allocator)
 ~Function_Variadic ()
RET operator() (ARGS...args) const

Protected Attributes

Function_Rep d_rep

Friends

class bsl::function< RET(ARGS...)>

Detailed Description

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

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.

See Component bslstl_function


Member Typedef Documentation

template<class RET , class... ARGS>
typedef RET bslstl::Function_Variadic< RET(ARGS...)>::result_type
template<class RET , class... ARGS>
typedef Function_Rep::allocator_type bslstl::Function_Variadic< RET(ARGS...)>::allocator_type

Constructor & Destructor Documentation

template<class RET , class... ARGS>
bslstl::Function_Variadic< RET(ARGS...)>::Function_Variadic ( const allocator_type allocator  ) 

Create an empty object. Use the specified allocator (e.g., the address of a bslma::Allocator) to supply memory.

template<class RET , class... ARGS>
bslstl::Function_Variadic< RET(ARGS...)>::~Function_Variadic (  ) 

// Destroy this object and its target object.


Member Function Documentation

template<class RET , class... ARGS>
RET bslstl::Function_Variadic< RET(ARGS...)>::operator() ( ARGS...  args  )  const

If this object is empty, throw bsl::bad_function_call; otherwise invoke the target object with the specified args... and return the result (after conversion to RET). Note that, even though it is declared const, this call operator can mutate the target object and is thus considered a manipulator rather than an accessor.


Friends And Related Function Documentation

template<class RET , class... ARGS>
friend class bsl::function< RET(ARGS...)> [friend]

Member Data Documentation

template<class RET , class... ARGS>
Function_Rep bslstl::Function_Variadic< RET(ARGS...)>::d_rep [protected]

Non-templated representation


The documentation for this class was generated from the following file: