File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1868,7 +1868,11 @@ template<typename T = no_user_data> class poller_t
1868
1868
public:
1869
1869
using event_type = poller_event<T>;
1870
1870
1871
- poller_t () = default ;
1871
+ poller_t () : poller_ptr(zmq_poller_new())
1872
+ {
1873
+ if (!poller_ptr)
1874
+ throw error_t ();
1875
+ }
1872
1876
1873
1877
template <
1874
1878
typename Dummy = void ,
@@ -1931,13 +1935,7 @@ template<typename T = no_user_data> class poller_t
1931
1935
}
1932
1936
};
1933
1937
1934
- std::unique_ptr<void , destroy_poller_t > poller_ptr{
1935
- []() {
1936
- auto poller_new = zmq_poller_new ();
1937
- if (poller_new)
1938
- return poller_new;
1939
- throw error_t ();
1940
- }()};
1938
+ std::unique_ptr<void , destroy_poller_t > poller_ptr;
1941
1939
1942
1940
void add_impl (zmq::socket_ref socket, event_flags events, T *user_data)
1943
1941
{
You can’t perform that action at this time.
0 commit comments