Problem: Examples are not compiled

Solution: Compile the examples when tests are compiled and using C++11
or greater.
This commit is contained in:
Gudmundur Adalsteinsson
2020-10-10 13:22:26 +00:00
parent 03243ad64d
commit 7a6c904f94
3 changed files with 32 additions and 4 deletions

View File

@@ -40,9 +40,10 @@ void SubscriberThread1(zmq::context_t *ctx) {
zmq::recv_result_t result =
zmq::recv_multipart(subscriber, std::back_inserter(recv_msgs));
assert(result && "recv failed");
assert(*result == 2);
std::cout << "Thread2: [" << recv_msgs[0].to_string_view() << "] "
<< recv_msgs[1].to_string_view() << std::endl;
std::cout << "Thread2: [" << recv_msgs[0].to_string() << "] "
<< recv_msgs[1].to_string() << std::endl;
}
}
@@ -60,9 +61,10 @@ void SubscriberThread2(zmq::context_t *ctx) {
zmq::recv_result_t result =
zmq::recv_multipart(subscriber, std::back_inserter(recv_msgs));
assert(result && "recv failed");
assert(*result == 2);
std::cout << "Thread3: [" << recv_msgs[0].to_string_view() << "] "
<< recv_msgs[1].to_string_view() << std::endl;
std::cout << "Thread3: [" << recv_msgs[0].to_string() << "] "
<< recv_msgs[1].to_string() << std::endl;
}
}