From 10b79717c494b2267d2f14e299062d6357aa4525 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 15 Aug 2018 02:10:35 +0200 Subject: [PATCH] further remove boilerplate around std::bind --- include/xbt/functional.hpp | 4 ---- src/simix/smx_deployment.cpp | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) 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)); }; } /** -- 2.20.1