Problem: MSVC always reports __cplusplus macro value as 199711L. Some newer features are switched off even with latest Visual studio version.

Solution: Add check for MSVC version along with __cplusplus check.
This commit is contained in:
Jovan Bunjevacki
2020-05-09 01:20:47 +02:00
parent 28cb820f4f
commit 804d528114
3 changed files with 3 additions and 3 deletions

View File

@@ -725,7 +725,7 @@ void zmq::ctx_t::unregister_endpoints (const socket_base_t *const socket_)
end = _endpoints.end ();
it != end;) {
if (it->second.socket == socket_)
#if __cplusplus >= 201103L
#if __cplusplus >= 201103L || (defined _MSC_VER && _MSC_VER >= 1700)
it = _endpoints.erase (it);
#else
_endpoints.erase (it++);