mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-13 10:52:57 +01:00
Merge pull request #337 from gummif/gfa/clang-warnings
Problem: Warnings about send being deprecated
This commit is contained in:
commit
3b1038d035
13
zmq.hpp
13
zmq.hpp
@ -1213,10 +1213,19 @@ public:
|
||||
throw error_t();
|
||||
}
|
||||
|
||||
template<typename T> bool send(T first, T last, int flags_ = 0)
|
||||
template<typename T>
|
||||
#ifdef ZMQ_CPP11
|
||||
ZMQ_DEPRECATED("from 4.4.1, use send taking message_t or buffer (for contiguous ranges), and send_flags")
|
||||
#endif
|
||||
bool send(T first, T last, int flags_ = 0)
|
||||
{
|
||||
zmq::message_t msg(first, last);
|
||||
return send(msg, flags_);
|
||||
int nbytes = zmq_msg_send(msg.handle(), _handle, flags_);
|
||||
if (nbytes >= 0)
|
||||
return true;
|
||||
if (zmq_errno() == EAGAIN)
|
||||
return false;
|
||||
throw error_t();
|
||||
}
|
||||
|
||||
#ifdef ZMQ_HAS_RVALUE_REFS
|
||||
|
Loading…
Reference in New Issue
Block a user