0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 07:31:03 +08:00

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++);

View File

@ -47,7 +47,7 @@
#include <sys/ucred.h>
#endif
#if __cplusplus >= 201103L
#if __cplusplus >= 201103L || (defined _MSC_VER && _MSC_VER >= 1700)
#include <type_traits>
#endif

View File

@ -126,7 +126,7 @@ void zmq::radio_t::xpipe_terminated (pipe_t *pipe_)
end = _subscriptions.end ();
it != end;) {
if (it->second == pipe_) {
#if __cplusplus >= 201103L
#if __cplusplus >= 201103L || (defined _MSC_VER && _MSC_VER >= 1700)
it = _subscriptions.erase (it);
#else
_subscriptions.erase (it++);