Merge pull request #43 from tolchz/master

Add an rvalue overload for socket_t::send
This commit is contained in:
Andrey Sibiryov 2015-03-05 20:44:11 -05:00
commit ac705f6047

View File

@ -441,6 +441,13 @@ namespace zmq
throw error_t (); throw error_t ();
} }
#ifdef ZMQ_HAS_RVALUE_REFS
inline bool send (message_t &&msg_, int flags_ = 0)
{
return send(msg_, flags_);
}
#endif
inline size_t recv (void *buf_, size_t len_, int flags_ = 0) inline size_t recv (void *buf_, size_t len_, int flags_ = 0)
{ {
int nbytes = zmq_recv (ptr, buf_, len_, flags_); int nbytes = zmq_recv (ptr, buf_, len_, flags_);