#include <iostream>
#include <future>
#include <chrono>
using namespace std;

template <class F>
void call_async(F&& fun) {
	thread_local char buf[sizeof(std::future<void>)] = {0};
    auto fut = new(buf) std::future<void>();
    *fut = std::async(std::launch::async, [fun]() {
        fun();
    });
}

void f()
{
	std::this_thread::sleep_for(10ms);
	cout << "LOL" << endl;
}

int main() 
{
	cout << "KEK" << endl;
	call_async(f);
	cout << "OMG" << endl;
	std::this_thread::sleep_for(100ms);
}