File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -213,13 +213,13 @@ namespace zmq
213
213
msg()
214
214
{
215
215
typedef typename std::iterator_traits<I>::difference_type size_type;
216
- typedef typename std::iterator_traits<I>::pointer pointer_t ;
216
+ typedef typename std::iterator_traits<I>::value_type value_t ;
217
217
218
- size_type const size_ = std::distance (first, last);
218
+ size_type const size_ = std::distance (first, last)* sizeof ( value_t ) ;
219
219
int const rc = zmq_msg_init_size (&msg, size_);
220
220
if (rc != 0 )
221
221
throw error_t ();
222
- std::copy (first, last, static_cast <pointer_t >(zmq_msg_data (&msg)) );
222
+ std::copy (first, last, static_cast <value_t * >(zmq_msg_data (&msg)) );
223
223
}
224
224
225
225
inline message_t (void *data_, size_t size_, free_fn *ffn_,
You can’t perform that action at this time.
0 commit comments