Skip to content

Commit 4648ebc

Browse files
authored
Merge pull request #89 from phlptp/master
Visual Studio 2015 definitions
2 parents e9b28db + 95ce4f2 commit 4648ebc

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

zmq.hpp

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@
2525
#ifndef __ZMQ_HPP_INCLUDED__
2626
#define __ZMQ_HPP_INCLUDED__
2727

28-
#if __cplusplus >= 201103L
29-
#define ZMQ_CPP11
30-
#define ZMQ_NOTHROW noexcept
31-
#define ZMQ_EXPLICIT explicit
28+
#if (__cplusplus >= 201103L)
29+
#define ZMQ_CPP11
30+
#define ZMQ_NOTHROW noexcept
31+
#define ZMQ_EXPLICIT explicit
32+
#elif (defined(_MSC_VER) && (_MSC_VER >= 1900))
33+
#define ZMQ_CPP11
34+
#define ZMQ_NOTHROW noexcept
35+
#define ZMQ_EXPLICIT explicit
3236
#else
3337
#define ZMQ_CPP03
3438
#define ZMQ_NOTHROW
@@ -66,6 +70,9 @@
6670
#else
6771
#define ZMQ_DELETED_FUNCTION
6872
#endif
73+
#elif defined(_MSC_VER) && (_MSC_VER >= 1900)
74+
#define ZMQ_HAS_RVALUE_REFS
75+
#define ZMQ_DELETED_FUNCTION = delete
6976
#elif defined(_MSC_VER) && (_MSC_VER >= 1600)
7077
#define ZMQ_HAS_RVALUE_REFS
7178
#define ZMQ_DELETED_FUNCTION
@@ -111,12 +118,17 @@ namespace zmq
111118
public:
112119

113120
error_t () : errnum (zmq_errno ()) {}
114-
115-
virtual const char *what () const throw ()
121+
#ifdef ZMQ_CPP11
122+
virtual const char *what () const noexcept
116123
{
117124
return zmq_strerror (errnum);
118125
}
119-
126+
#else
127+
virtual const char *what() const throw ()
128+
{
129+
return zmq_strerror(errnum);
130+
}
131+
#endif
120132
int num () const
121133
{
122134
return errnum;

0 commit comments

Comments
 (0)