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:
parent
28cb820f4f
commit
804d528114
@ -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++);
|
||||
|
@ -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
|
||||
|
||||
|
@ -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++);
|
||||
|
Loading…
x
Reference in New Issue
Block a user