File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ TEST_CASE("socket options", "[socket]")
6969 socket.set (zmq::sockopt::routing_id, " foobar" );
7070 socket.set (zmq::sockopt::routing_id, zmq::buffer (id));
7171 socket.set (zmq::sockopt::routing_id, id);
72- #ifdef ZMQ_CPP17
72+ #if defined(ZMQ_HAS_STRING_VIEW) && (ZMQ_HAS_STRING_VIEW > 0)
7373 socket.set (zmq::sockopt::routing_id, std::string_view{id});
7474#endif
7575
Original file line number Diff line number Diff line change @@ -582,7 +582,7 @@ class message_t
582582 {
583583 return std::string (static_cast <const char *>(data ()), size ());
584584 }
585- #ifdef ZMQ_CPP17
585+ #if defined(ZMQ_HAS_STRING_VIEW) && (ZMQ_HAS_STRING_VIEW > 0)
586586 // interpret message content as a string
587587 std::string_view to_string_view () const noexcept
588588 {
@@ -1662,7 +1662,7 @@ class socket_base
16621662 set_option (Opt, buf.data (), buf.size ());
16631663 }
16641664
1665- #ifdef ZMQ_CPP17
1665+ #if defined(ZMQ_HAS_STRING_VIEW) && (ZMQ_HAS_STRING_VIEW > 0)
16661666 // Set array socket option, e.g.
16671667 // `socket.set(zmq::sockopt::routing_id, id_str)`
16681668 template <int Opt, int NullTerm>
You can’t perform that action at this time.
0 commit comments