You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS2013 incorrectly reports "warning C4573: the usage of 'symbol' requires the compiler to capture 'this' but the current default capture mode does not allow it"; the issue and workaround is the same as for GCC 4.7 in commit:5244af7c.
// GCC Bug 56222 - Pointer to member in lambda should not require this to be captured
53
+
// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56222
54
+
// GCC Bug 51494 - Legal program rejection - capturing "this" when using static method inside lambda
55
+
// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51494
56
+
#defineAND_CAPTURE_MEMBER_FUNCTION_POINTERS , this
57
+
#endif
58
+
59
+
#elif defined(_MSC_VER)
60
+
61
+
#if _MSC_VER >= 1900
62
+
#defineAND_CAPTURE_MEMBER_FUNCTION_POINTERS
63
+
#else
64
+
// This bug also afflicts VS2013 which incorrectly reports "warning C4573: the usage of 'symbol' requires the compiler to capture 'this' but the current default capture mode does not allow it"
65
+
#defineAND_CAPTURE_MEMBER_FUNCTION_POINTERS , this
66
+
#endif
67
+
68
+
#else
69
+
70
+
#defineAND_CAPTURE_MEMBER_FUNCTION_POINTERS
71
+
72
+
#endif
73
+
47
74
using boost::asio::ip::tcp;
48
75
49
76
#ifdef __ANDROID__
@@ -620,7 +647,7 @@ class asio_context : public request_context, public std::enable_shared_from_this
0 commit comments