Browse Source

[master] define a wrapper object to pass to io_service::post explicitly.

depending on the version of boost and sunstudio, passing a temporary still
doesn't seem to work.
JINMEI Tatuya 12 years ago
parent
commit
fc4e4e5c2c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib/asiolink/io_service.cc

+ 2 - 1
src/lib/asiolink/io_service.cc

@@ -81,7 +81,8 @@ public:
     /// generalized.
     asio::io_service& get_io_service() { return io_service_; };
     void post(const boost::function<void ()>& callback) {
-        io_service_.post(CallbackWrapper(callback));
+        const CallbackWrapper wrapper(callback);
+        io_service_.post(wrapper);
     }
 private:
     asio::io_service io_service_;