]> AND Public Git Repository - simgrid.git/blobdiff - include/simgrid/simix.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
set_kill_time is a method of ActorImpl
[simgrid.git] / include / simgrid / simix.hpp
index 7137598d14f7e3e4f947db5f17b332328ded6a72..b01db1492c670f851eebe3ed27ab4372c3af81fa 100644 (file)
@@ -61,7 +61,7 @@ template <class F> typename std::result_of<F()>::type simcall(F&& code)
   // conveniently handles the success/failure value for us.
   typedef typename std::result_of<F()>::type R;
   simgrid::xbt::Result<R> result;
-  simcall_run_kernel([&] { simgrid::xbt::fulfill_promise(result, std::forward<F>(code)); });
+  simcall_run_kernel([&result, &code] { simgrid::xbt::fulfill_promise(result, std::forward<F>(code)); });
   return result.get();
 }
 
@@ -91,7 +91,7 @@ smx_timer_t SIMIX_timer_set(double date, F callback)
 template<class R, class T> inline
 smx_timer_t SIMIX_timer_set(double date, R(*callback)(T*), T* arg)
 {
-  return SIMIX_timer_set(date, [=](){ callback(arg); });
+  return SIMIX_timer_set(date, [callback, arg]() { callback(arg); });
 }
 
 #endif