Empirical
Public Member Functions | List of all members
emp::GenericFunction Class Reference

#include <GenericFunction.h>

Inheritance diagram for emp::GenericFunction:
emp::Function< RETURN(PARAMS...)>

Public Member Functions

virtual ~GenericFunction ()
 
template<typename RETURN , typename... Ts>
auto Call (Ts &&...args)
 A generic form of the function call operator; use arg types to determine derived form. More...
 
template<typename RETURN , typename... Ts>
auto operator() (Ts &&...args)
 A generic form of the function call operator; use arg types to determine derived form. More...
 
template<typename T >
auto Convert ()
 Convert this GenericFunction into a derived emp::Function. More...
 

Detailed Description

The emp::Function templated class behaves almost identically to std::function, but can be reduced to the emp::GenericFunction base class which is NOT templated.

An emp::GenericFunction object can be converted back into the derived type with the .Convert<return(args...)>() member function.

Constructor & Destructor Documentation

virtual emp::GenericFunction::~GenericFunction ( )
inlinevirtual

Member Function Documentation

template<typename RETURN , typename... Ts>
auto emp::GenericFunction::Call ( Ts &&...  args)

A generic form of the function call operator; use arg types to determine derived form.

template<typename T >
auto emp::GenericFunction::Convert ( )

Convert this GenericFunction into a derived emp::Function.

template<typename RETURN , typename... Ts>
auto emp::GenericFunction::operator() ( Ts &&...  args)
inline

A generic form of the function call operator; use arg types to determine derived form.


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