Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[simix] Pass the code by reference in simcall_run_kernel
[simgrid.git] / include / simgrid / simix.hpp
index 1f88d97..901081a 100644 (file)
 
 XBT_PUBLIC(void) simcall_run_kernel(std::function<void()> const& code);
 
+template<class F> inline
+void simcall_run_kernel(F& f)
+{
+  simcall_run_kernel(std::function<void()>(std::ref(f)));
+}
+
 namespace simgrid {
 namespace simix {