Skip to content

Commit

Permalink
Fix intrusive_ptr template init on windows. The second template argum…
Browse files Browse the repository at this point in the history
…ent 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 XRPLF#198 (with a semi hack).
  • Loading branch information
Jonne Nauha committed Apr 2, 2013
1 parent 834e3e4 commit 75b2497
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions websocketpp/endpoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,14 @@ class endpoint : public config::transport_type, public config::endpoint_base {
*/
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);
Expand Down

0 comments on commit 75b2497

Please sign in to comment.