From: JINMEI Tatuya Date: Fri, 3 May 2013 07:26:35 +0000 (+0000) Subject: [master] define a wrapper object to pass to io_service::post explicitly. X-Git-Tag: bind10-1.2.0beta1-release~474^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc4e4e5c2c469c8c464146bfe56cda99effd4593;p=thirdparty%2Fkea.git [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. --- diff --git a/src/lib/asiolink/io_service.cc b/src/lib/asiolink/io_service.cc index aebafcbec4..df083162fe 100644 --- a/src/lib/asiolink/io_service.cc +++ b/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& callback) { - io_service_.post(CallbackWrapper(callback)); + const CallbackWrapper wrapper(callback); + io_service_.post(wrapper); } private: asio::io_service io_service_;