mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-05-16 11:56:36 +02:00
Merge pull request #326 from girtsf/fix-gcc-4.8.1
make poller_t work with ancient gcc 4.8.1
This commit is contained in:
commit
3e88f06e15
14
zmq.hpp
14
zmq.hpp
@ -1868,7 +1868,11 @@ template<typename T = no_user_data> class poller_t
|
|||||||
public:
|
public:
|
||||||
using event_type = poller_event<T>;
|
using event_type = poller_event<T>;
|
||||||
|
|
||||||
poller_t() = default;
|
poller_t() : poller_ptr(zmq_poller_new())
|
||||||
|
{
|
||||||
|
if (!poller_ptr)
|
||||||
|
throw error_t();
|
||||||
|
}
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename Dummy = void,
|
typename Dummy = void,
|
||||||
@ -1931,13 +1935,7 @@ template<typename T = no_user_data> class poller_t
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
std::unique_ptr<void, destroy_poller_t> poller_ptr{
|
std::unique_ptr<void, destroy_poller_t> poller_ptr;
|
||||||
[]() {
|
|
||||||
auto poller_new = zmq_poller_new();
|
|
||||||
if (poller_new)
|
|
||||||
return poller_new;
|
|
||||||
throw error_t();
|
|
||||||
}()};
|
|
||||||
|
|
||||||
void add_impl(zmq::socket_ref socket, event_flags events, T *user_data)
|
void add_impl(zmq::socket_ref socket, event_flags events, T *user_data)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user