Open QuLogic opened 5 years ago
Seems to also affect tests/active_poller.cpp
.
Thanks for pointing this out. This is inconsistent for sure. However, I think that ZMQ_BUILD_DRAFT_API implies ZMQ_HAVE_POLLER, so only one of ZMQ_BUILD_DRAFT_API or ZMQ_HAVE_POLLER needs to be used in the condition. I will check this in libzmq.
Use have_poller so that when it goes out of draft you don't have to change the code
In
zmq.hpp
,poller_t
is defined if#if defined(ZMQ_BUILD_DRAFT_API) && defined(ZMQ_CPP11) && defined(ZMQ_HAVE_POLLER)
.In
tests/poller.cpp
, the code is wrapped in#if defined(ZMQ_CPP11) && defined(ZMQ_BUILD_DRAFT_API)
.It seems the latter is missing the check for
ZMQ_HAVE_POLLER
, which can cause compile to fail with undefined types.