diff --git a/include/sta/tacos.hpp b/include/sta/tacos.hpp index fb14a3a..bec1616 100644 --- a/include/sta/tacos.hpp +++ b/include/sta/tacos.hpp @@ -13,6 +13,7 @@ #include #include +#include namespace sta @@ -52,8 +53,11 @@ namespace sta * @param states A list of states in which the thread should run. * @param args The constructor arguments for the provided class. */ - template - void addThread(std::list states, std::initializer_list args); + template + void addThread(std::list states, Args ... args) + { + Manager::instance()->registerThread(std::make_shared(args...), states); + } } // namespace tacos } diff --git a/src/tacos.cpp b/src/tacos.cpp index ea4a1c4..45aa708 100644 --- a/src/tacos.cpp +++ b/src/tacos.cpp @@ -26,12 +26,6 @@ namespace sta { Statemachine::instance()->requestTimedStateTransition(from, to, millis, lockout); } - - template - void addThread(std::list states, std::initializer_list args) - { - Manager::instance()->registerThread(std::make_shared(args), states); - } } // namespace tacos } // namespace sta