| 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 |
nothing calls this directly
no test coverage detected