Merge pull request #416 from gummif/gfa/macro-doc

Problem: Feature checking inconsistencies
This commit is contained in:
Simon Giesecke
2020-06-19 18:02:51 +02:00
committed by GitHub
5 changed files with 37 additions and 17 deletions

View File

@@ -222,7 +222,7 @@ TEST_CASE("mutable_buffer creation string", "[buffer]")
CHECK(b2.data() == d.data());
}
#ifdef ZMQ_CPP17
#if CPPZMQ_HAS_STRING_VIEW
TEST_CASE("const_buffer creation string_view", "[buffer]")
{
std::wstring dstr(10, L'a');

View File

@@ -158,7 +158,7 @@ TEST_CASE("message to string", "[message]")
const zmq::message_t b("Foo", 3);
CHECK(a.to_string() == "");
CHECK(b.to_string() == "Foo");
#ifdef ZMQ_CPP17
#if CPPZMQ_HAS_STRING_VIEW
CHECK(a.to_string_view() == "");
CHECK(b.to_string_view() == "Foo");
#endif

View File

@@ -69,7 +69,7 @@ TEST_CASE("socket options", "[socket]")
socket.set(zmq::sockopt::routing_id, "foobar");
socket.set(zmq::sockopt::routing_id, zmq::buffer(id));
socket.set(zmq::sockopt::routing_id, id);
#ifdef ZMQ_CPP17
#if CPPZMQ_HAS_STRING_VIEW
socket.set(zmq::sockopt::routing_id, std::string_view{id});
#endif