Skip to content

Commit 5ecbf86

Browse files
committed
Problem: send_multipart fails on old gcc versions
Solution: remove template type checks if there is only partial C++11 support
1 parent 5999e5a commit 5ecbf86

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

zmq_addon.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@ ZMQ_NODISCARD recv_result_t recv_multipart_n(socket_ref s,
123123
by the msgs range will be propagated and the message
124124
may have been only partially sent. It is adviced to close this socket in that event.
125125
*/
126-
template<class Range,
127-
typename = typename std::enable_if<
126+
template<class Range
127+
#ifndef ZMQ_CPP11_PARTIAL
128+
, typename = typename std::enable_if<
128129
detail::is_range<Range>::value
129130
&& (std::is_same<detail::range_value_t<Range>, message_t>::value
130-
|| detail::is_buffer<detail::range_value_t<Range>>::value)>::type>
131+
|| detail::is_buffer<detail::range_value_t<Range>>::value)>::type
132+
#endif
133+
>
131134
send_result_t
132135
send_multipart(socket_ref s, Range &&msgs, send_flags flags = send_flags::none)
133136
{

0 commit comments

Comments
 (0)