Added poll() overload accepting std::array

This commit is contained in:
Critical2104 2020-05-10 02:30:38 +02:00 committed by Simon Giesecke
parent b495021ac8
commit 8d35b8c934

View File

@ -314,6 +314,13 @@ inline int poll(std::vector<zmq_pollitem_t> &items, long timeout_ = -1)
{
return poll(items.data(), items.size(), timeout_);
}
template<std::size_t SIZE>
inline int poll(std::array<zmq_pollitem_t, SIZE>& items,
std::chrono::milliseconds timeout)
{
return poll(items.data(), items.size(), static_cast<long>(timeout.count()));
}
#endif