Skip to content

Commit 8d35b8c

Browse files
Critical2104sigiesec
authored andcommitted
Added poll() overload accepting std::array
1 parent b495021 commit 8d35b8c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

zmq.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,13 @@ inline int poll(std::vector<zmq_pollitem_t> &items, long timeout_ = -1)
314314
{
315315
return poll(items.data(), items.size(), timeout_);
316316
}
317+
318+
template<std::size_t SIZE>
319+
inline int poll(std::array<zmq_pollitem_t, SIZE>& items,
320+
std::chrono::milliseconds timeout)
321+
{
322+
return poll(items.data(), items.size(), static_cast<long>(timeout.count()));
323+
}
317324
#endif
318325

319326

0 commit comments

Comments
 (0)