mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-05-15 19:36:51 +02:00
Rename template parameter to reflect requirements
This commit is contained in:
parent
1f4dd23a94
commit
95d519fade
7
zmq.hpp
7
zmq.hpp
@ -248,12 +248,13 @@ class message_t
|
|||||||
throw error_t();
|
throw error_t();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T> message_t(T first, T last)
|
template<class ForwardIter> message_t(ForwardIter first, ForwardIter last)
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<T>::value_type value_t;
|
typedef typename std::iterator_traits<ForwardIter>::value_type value_t;
|
||||||
|
|
||||||
assert(std::distance(first, last) >= 0);
|
assert(std::distance(first, last) >= 0);
|
||||||
size_t const size_ = static_cast<size_t>(std::distance(first, last)) * sizeof(value_t);
|
size_t const size_ =
|
||||||
|
static_cast<size_t>(std::distance(first, last)) * sizeof(value_t);
|
||||||
int const rc = zmq_msg_init_size(&msg, size_);
|
int const rc = zmq_msg_init_size(&msg, size_);
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
throw error_t();
|
throw error_t();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user