This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pthread.h> | |
template <typename... Args> struct function { | |
void (*callable)(void *, Args...) = nullptr; | |
static constexpr u32 MAX_CONTEXT_SIZE = 32; | |
char *context = nullptr; | |
function() : context(new char[MAX_CONTEXT_SIZE]) {} | |
template <typename Type> function(Type _function) : function() { |
OlderNewer