AsyncFw
1.2
Async Framework is c++ runtime with timers, poll notifiers, sockets, coroutines, etc.
Loading...
Searching...
No Matches
function.hpp
1
/*
2
Copyright (c) 2026 Alexandr Kuzmuk
3
4
This file is part of the AsyncFw project. Licensed under the MIT License.
5
See {Link: LICENSE file https://mit-license.org} in the project root for full license information.
6
*/
7
8
#pragma once
9
10
namespace
AsyncFw {
11
template
<
typename
... Args>
12
struct
AbstractFunction {
13
virtual
void
operator()(Args...) = 0;
14
virtual
~AbstractFunction() =
default
;
15
};
16
template
<
typename
... Args>
17
struct
FunctionArgs {
18
template
<
typename
T>
19
struct
Function :
public
AbstractFunction<Args...> {
20
void
operator()(Args... args)
override
{ f(args...); }
21
Function(T &_f) : f(std::move(_f)) {}
22
23
private
:
24
T f;
25
};
26
};
27
}
// namespace AsyncFw
core
function.hpp
Generated by
1.13.2