Skip to content

Instantly share code, notes, and snippets.

@mutac
mutac / static_array.cpp
Last active October 2, 2018 22:52
Generate static array of c-compatible "anonymous" function with a numeric closure (c++14)
#include <stdio.h>
#include <utility>
typedef void (*FuncPtr)(const char* arg1, const char* arg2);
void Func(const char* arg1, const char* arg2, size_t arg3)
{
printf("%s %s %ld\n", arg1, arg2, arg3);
}