We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e972f39 + c03fb35 commit cdef8bcCopy full SHA for cdef8bc
zmq.hpp
@@ -1022,12 +1022,7 @@ namespace zmq
1022
class poller_t
1023
{
1024
public:
1025
- poller_t ()
1026
- {
1027
- if (!poller_ptr)
1028
- throw error_t ();
1029
- }
1030
-
+ poller_t () = default;
1031
~poller_t () = default;
1032
1033
poller_t(const poller_t&) = delete;
@@ -1116,7 +1111,12 @@ namespace zmq
1116
1111
private:
1117
1112
std::unique_ptr<void, std::function<void(void*)>> poller_ptr
1118
1113
1119
- zmq_poller_new (),
1114
+ []() {
1115
+ auto poller_new = zmq_poller_new ();
+ if (poller_new)
+ return poller_new;
+ throw error_t ();
+ }(),
1120
[](void *ptr) {
1121
int rc = zmq_poller_destroy (&ptr);
1122
ZMQ_ASSERT (rc == 0);
0 commit comments