#include #include "Types.h" #include "Noncopyable.h" class Executable { MAKE_NONCOPYABLE(Executable); MAKE_NONMOVABLE(Executable); public: Executable(void* code, std::size_t code_size); ~Executable(); template Return run() const { using ExecutableFunction = Return(); auto executable_function = reinterpret_cast(m_code); return executable_function(); } private: void* m_code; std::size_t m_code_size; };