#ifndef ENGINE_H #define ENGINE_H #include #include #include #include #include "httprunner.h" #include "jobpoolrunner.h" #include "job.h" template class CEngine { std::array, sizeof...(Runners)> m_aRunners; public: template constexpr static int RunnerID(std::integer_sequence) { auto l = {std::is_same_v * Indices...}; return std::accumulate(l.begin(), l.end(), 0); } template constexpr static int RunnerID() { return RunnerID(std::index_sequence_for()); } void RegisterRunners() { m_aRunners = {std::make_unique()...}; } template, bool> = true> int Dispatch(T Job) { return RunnerID(); } }; using CEngineDDNet = CEngine; #else #endif