Skip to content

Commit ab09335

Browse files
committed
fix: add missing #ifdef guard for ZMQ_EXTENDED_CONSTEXPR in socket_t
operator void*() in socket_t was missing the #ifdef ZMQ_EXTENDED_CONSTEXPR guard present on all other uses of the macro, causing a compilation error when built with C++11 where the macro is not defined.
1 parent b214ca1 commit ab09335

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

zmq.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,7 +2337,11 @@ class socket_t : public detail::socket_base
23372337

23382338
~socket_t() ZMQ_NOTHROW { close(); }
23392339

2340+
#ifdef ZMQ_EXTENDED_CONSTEXPR
23402341
ZMQ_EXTENDED_CONSTEXPR operator void *() ZMQ_NOTHROW { return _handle; }
2342+
#else
2343+
operator void *() ZMQ_NOTHROW { return _handle; }
2344+
#endif
23412345

23422346
ZMQ_CONSTEXPR_FN operator void const *() const ZMQ_NOTHROW { return _handle; }
23432347

0 commit comments

Comments
 (0)