Skip to content

Commit 99b9967

Browse files
authored
Merge pull request #216 from kurdybacha/deprecated_draft
Problem: deprecated poller's add method in draft API
2 parents 17e1d97 + 94e0fb0 commit 99b9967

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

tests/poller.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@ TEST(poller, poller_remove_invalid_socket_throws)
265265
TEST(poller, wait_on_added_empty_handler)
266266
{
267267
server_client_setup s;
268-
ASSERT_NO_THROW(s.client.send("Hi"));
268+
ASSERT_NO_THROW (s.client.send ("Hi"));
269269
zmq::poller_t poller;
270-
std::function<void(void)> handler;
271-
ASSERT_NO_THROW(poller.add(s.server, ZMQ_POLLIN, handler));
272-
ASSERT_NO_THROW(poller.wait(std::chrono::milliseconds{-1}));
270+
zmq::poller_t::handler_t handler;
271+
ASSERT_NO_THROW (poller.add (s.server, ZMQ_POLLIN, handler));
272+
ASSERT_NO_THROW (poller.wait (std::chrono::milliseconds {-1}));
273273
}
274274

275275
TEST(poller, modify_empty_throws)

zmq.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,13 +1050,6 @@ namespace zmq
10501050

10511051
using handler_t = std::function<void(short)>;
10521052

1053-
ZMQ_DEPRECATED("from 4.3.0, use overload accepting handler_t instead")
1054-
void add (zmq::socket_t &socket, short events, std::function<void(void)> &handler)
1055-
{
1056-
add (socket, events, handler ? [&handler](short) { handler(); }
1057-
: handler_t{});
1058-
}
1059-
10601053
void add (zmq::socket_t &socket, short events, handler_t handler)
10611054
{
10621055
auto it = std::end (handlers);

0 commit comments

Comments
 (0)