mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-12 10:33:52 +01:00
Added poll() overload accepting std::array
This commit is contained in:
parent
b495021ac8
commit
8d35b8c934
7
zmq.hpp
7
zmq.hpp
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user