X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cd44a23e6da8aad6dfd75659fe09cf94b7ae0ff8..19e1048a7009c4144b0f361ad85fb9dff44761ea:/include/simgrid/s4u/Actor.hpp diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index f26e7e238e..1d2ac9318f 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -110,6 +110,21 @@ public: /** Start a previously initialized actor */ ActorPtr start(const std::function& code); + template ActorPtr start(F code) { return start(std::function(std::move(code))); } + + template +#endif + > + ActorPtr start(F code, Args... args) + { + return start(std::bind(std::move(code), std::move(args)...)); + } + + ActorPtr start(const std::function& code, std::vector args); + /** Create an actor from a callable thing. */ template static ActorPtr create(const std::string& name, s4u::Host* host, F code) {