Base module

FunctionDelegate

The [FunctionDelegate]({#ref structicy_1_1FunctionDelegate #}) contains a std::function.

FunctionDelegate

#include <icy/delegate.h>

Inherits: AbstractDelegate< RT, Args... >

The [FunctionDelegate](#functiondelegate) contains a std::function.

Public Attributes

ReturnNameDescription
std::function< RT(Args...)>func

func

std::function< RT(Args...)> func

Public Methods

ReturnNameDescription
FunctionDelegate inline#### Parameters
RToperator() virtual const inlineCalls the wrapped std::function.
booloperator== virtual const inlineAlways returns false; std::function targets cannot be compared for equality.

FunctionDelegate

inline

inline FunctionDelegate(std::function< RT(Args...)> func)

Parameters

  • func std::function to wrap.

operator()

virtual const inline

virtual inline RT operator()(Args... args) const

Calls the wrapped std::function.

Parameters

  • args Arguments forwarded to the function.

Returns

Function result.


operator==

virtual const inline

virtual inline bool operator==(const AbstractDelegate< RT, Args... > &) const

Always returns false; std::function targets cannot be compared for equality.