Function delegate. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.
More...
#include <func.h>
Inherits System::MulticastDelegate<::System::Detail::FuncArgsReorderer< void(), Args... >::type >.
template<typename... Args>
class System::Func< Args >
Function delegate. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.
#include "system/func.h"
#include <iostream>
{
std::cout << func(x) << std::endl;
}
int main()
{
{
return x * x;
});
Print(1, func);
Print(2, func);
Print(3, func);
return 0;
}
Function delegate. This type should be allocated on stack and passed to functions by value or by refe...
Definition: func.h:82
- Template Parameters
-
Args | Call arguments, then mandatory return type. |
◆ Func() [1/4]
template<typename... Args>
Default constructor that creates null-Func.
◆ Func() [2/4]
template<typename... Args>
template<typename T >
Constructor that constructs Func object and assigns value (either actual callback or nullptr) to it.
- Template Parameters
-
- Parameters
-
◆ Func() [3/4]
template<typename... Args>
Copy constructor.
- Parameters
-
◆ Func() [4/4]
template<typename... Args>
Move constructor.
- Parameters
-
◆ ~Func()
template<typename... Args>
◆ operator=() [1/2]
template<typename... Args>
Copy assignment.
- Parameters
-
other | Func delegate to copy to current object. |
- Returns
- Reference to this.
◆ operator=() [2/2]
template<typename... Args>
Move assignment.
- Parameters
-
other | Func delegate to move to current object. The state can be changed. |
- Returns
- Reference to this.