MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / make_executor

Function make_executor

include/concurrencpp/runtime/runtime.h:77–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75
76 template<class executor_type, class... argument_types>
77 std::shared_ptr<executor_type> make_executor(argument_types&&... arguments) {
78 static_assert(
79 std::is_base_of_v<concurrencpp::executor, executor_type>,
80 "concurrencpp::runtime::make_executor - <<executor_type>> is not a derived class of concurrencpp::executor.");
81
82 static_assert(std::is_constructible_v<executor_type, argument_types...>,
83 "concurrencpp::runtime::make_executor - can not build <<executor_type>> from <<argument_types...>>.");
84
85 static_assert(!std::is_abstract_v<executor_type>,
86 "concurrencpp::runtime::make_executor - <<executor_type>> is an abstract class.");
87
88 auto executor = std::make_shared<executor_type>(std::forward<argument_types>(arguments)...);
89 m_registered_executors.register_executor(executor);
90 return executor;
91 }
92 };
93} // namespace concurrencpp
94

Callers

nothing calls this directly

Calls 1

register_executorMethod · 0.80

Tested by

no test coverage detected