Skip to content

Commit 44c4918

Browse files
garethsbBillyONeal
authored andcommitted
Workarounds for two GCC 4.7.2 bugs with lambda functions (#1209)
* Workarounds for two GCC 4.7.2 bugs with lambda functions using implicit this, surfacing as incorrect const-qualification and an internal compiler error. Resolves immediate issues identified in #1200. * Restore compatibility with modern compilers
1 parent a40a286 commit 44c4918

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Release/src/websockets/client/ws_client_wspp.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class wspp_callback_client : public websocket_client_callback_impl,
292292

293293
client.set_fail_handler([this](websocketpp::connection_hdl con_hdl) {
294294
_ASSERTE(m_state == CONNECTING);
295-
shutdown_wspp_impl<WebsocketConfigType>(con_hdl, true);
295+
this->shutdown_wspp_impl<WebsocketConfigType>(con_hdl, true);
296296
});
297297

298298
client.set_message_handler(
@@ -354,7 +354,7 @@ class wspp_callback_client : public websocket_client_callback_impl,
354354

355355
client.set_close_handler([this](websocketpp::connection_hdl con_hdl) {
356356
_ASSERTE(m_state != CLOSED);
357-
shutdown_wspp_impl<WebsocketConfigType>(con_hdl, false);
357+
this->shutdown_wspp_impl<WebsocketConfigType>(con_hdl, false);
358358
});
359359

360360
// Set User Agent specified by the user. This needs to happen before any connection is created
@@ -679,7 +679,7 @@ class wspp_callback_client : public websocket_client_callback_impl,
679679
client.stop_perpetual();
680680

681681
// Can't join thread directly since it is the current thread.
682-
pplx::create_task([this, connecting, ec, closeCode, reason] {
682+
pplx::create_task([] {}).then([this, connecting, ec, closeCode, reason]() mutable {
683683
{
684684
std::lock_guard<std::mutex> lock(m_wspp_client_lock);
685685
if (m_thread.joinable())

0 commit comments

Comments
 (0)