Fix intrusive_ptr template init on windows. The second template argument should probably be removed if its not neccesary for other platforms. I did not find boost documentation for what the second argument actually does, but in the meanwhile ifdeffed so that builds on windows (yes its ugly). Fixes #198 (with a semi hack).

This commit is contained in:
Jonne Nauha
2013-04-03 01:52:22 +03:00
parent 834e3e4fae
commit 75b2497f2b

View File

@@ -304,7 +304,14 @@ public:
*/
connection_ptr get_con_from_hdl(connection_hdl hdl, lib::error_code & ec) {
scoped_lock_type lock(m_mutex);
/** @todo This wont build on windows with null as the second template argument.
I tried to look at the boost docs for this and cound not find why the second param is here.
Cleanup ifdefs when verified this builds on other systems. */
#ifdef WIN32
connection_ptr con = lib::static_pointer_cast<connection_type>(
#else
connection_ptr con = lib::static_pointer_cast<connection_type,void>(
#endif
hdl.lock());
if (!con) {
ec = error::make_error_code(error::bad_connection);