File tree 2 files changed +3
-3
lines changed 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]")
69
69
socket.set (zmq::sockopt::routing_id, " foobar" );
70
70
socket.set (zmq::sockopt::routing_id, zmq::buffer (id));
71
71
socket.set (zmq::sockopt::routing_id, id);
72
- #ifdef ZMQ_CPP17
72
+ #if defined(ZMQ_HAS_STRING_VIEW) && (ZMQ_HAS_STRING_VIEW > 0)
73
73
socket.set (zmq::sockopt::routing_id, std::string_view{id});
74
74
#endif
75
75
Original file line number Diff line number Diff line change @@ -582,7 +582,7 @@ class message_t
582
582
{
583
583
return std::string (static_cast <const char *>(data ()), size ());
584
584
}
585
- #ifdef ZMQ_CPP17
585
+ #if defined(ZMQ_HAS_STRING_VIEW) && (ZMQ_HAS_STRING_VIEW > 0)
586
586
// interpret message content as a string
587
587
std::string_view to_string_view () const noexcept
588
588
{
@@ -1662,7 +1662,7 @@ class socket_base
1662
1662
set_option (Opt, buf.data (), buf.size ());
1663
1663
}
1664
1664
1665
- #ifdef ZMQ_CPP17
1665
+ #if defined(ZMQ_HAS_STRING_VIEW) && (ZMQ_HAS_STRING_VIEW > 0)
1666
1666
// Set array socket option, e.g.
1667
1667
// `socket.set(zmq::sockopt::routing_id, id_str)`
1668
1668
template <int Opt, int NullTerm>
You can’t perform that action at this time.
0 commit comments