From: Martin Quinson Date: Wed, 15 Aug 2018 00:10:35 +0000 (+0200) Subject: further remove boilerplate around std::bind X-Git-Tag: v3_21~248 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/10b79717c494b2267d2f14e299062d6357aa4525 further remove boilerplate around std::bind --- diff --git a/include/xbt/functional.hpp b/include/xbt/functional.hpp index 48803e619e..e6f7ca7b08 100644 --- a/include/xbt/functional.hpp +++ b/include/xbt/functional.hpp @@ -56,10 +56,6 @@ template inline std::function wrap_main(F code, std::vector(std::move(code), std::move(args)); } -inline std::function wrap_main(void (*code)(std::vector), std::vector args) -{ - return std::bind(std::move(code), std::move(args)); -} template inline std::function wrap_main(F code, int argc, const char* const argv[]) { diff --git a/src/simix/smx_deployment.cpp b/src/simix/smx_deployment.cpp index 79045d9f53..2226ad9679 100644 --- a/src/simix/smx_deployment.cpp +++ b/src/simix/smx_deployment.cpp @@ -69,7 +69,7 @@ static simgrid::simix::ActorCodeFactory toActorCodeFactory(xbt_main_func_t code) } static simgrid::simix::ActorCodeFactory toActorCodeFactory(void (*code)(std::vector)) { - return [code](std::vector args) { return simgrid::xbt::wrap_main(code, std::move(args)); }; + return [code](std::vector args) { return std::bind(std::move(code), std::move(args)); }; } /**