From 95d519fade9c43419f6fb4ade4d390c483dacf64 Mon Sep 17 00:00:00 2001 From: Gudmundur Adalsteinsson Date: Wed, 15 May 2019 11:20:31 +0000 Subject: [PATCH] Rename template parameter to reflect requirements --- zmq.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zmq.hpp b/zmq.hpp index 088a544..597546d 100644 --- a/zmq.hpp +++ b/zmq.hpp @@ -248,12 +248,13 @@ class message_t throw error_t(); } - template message_t(T first, T last) + template message_t(ForwardIter first, ForwardIter last) { - typedef typename std::iterator_traits::value_type value_t; + typedef typename std::iterator_traits::value_type value_t; assert(std::distance(first, last) >= 0); - size_t const size_ = static_cast(std::distance(first, last)) * sizeof(value_t); + size_t const size_ = + static_cast(std::distance(first, last)) * sizeof(value_t); int const rc = zmq_msg_init_size(&msg, size_); if (rc != 0) throw error_t();