Problem: Poller size function missing

Solution: Add it to poller_t
This commit is contained in:
Gudmundur Adalsteinsson
2020-10-10 21:22:16 +00:00
parent 03243ad64d
commit 2af0c0105a
2 changed files with 23 additions and 0 deletions

View File

@@ -2653,6 +2653,15 @@ template<typename T = no_user_data> class poller_t
throw error_t();
}
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 3, 3)
size_t size() const noexcept
{
int rc = zmq_poller_size(const_cast<void *>(poller_ptr.get()));
ZMQ_ASSERT(rc >= 0);
return static_cast<size_t>(std::max(rc, 0));
}
#endif
private:
struct destroy_poller_t
{