Skip to content

Commit d4d3ce3

Browse files
committed
Suppport for raw arrays in send_multipart
1 parent 5cc7793 commit d4d3ce3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

zmq_addon.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ template<class Range,
9696
detail::send_result_t send_multipart(socket_ref s, Range&& msgs,
9797
send_flags flags = send_flags::none)
9898
{
99-
auto it = msgs.begin();
100-
const auto end_it = msgs.end();
99+
using std::begin;
100+
using std::end;
101+
auto it = begin(msgs);
102+
const auto end_it = end(msgs);
101103
size_t msg_count = 0;
102104
while (it != end_it)
103105
{
@@ -106,7 +108,7 @@ detail::send_result_t send_multipart(socket_ref s, Range&& msgs,
106108
if (!s.send(*it, msg_flags))
107109
{
108110
// zmq ensures atomic delivery of messages
109-
assert(it == msgs.begin());
111+
assert(it == begin(msgs));
110112
return {};
111113
}
112114
++msg_count;

0 commit comments

Comments
 (0)