From f518a648ef70cbd9bac841de27a98062a4cc4f44 Mon Sep 17 00:00:00 2001 From: Pawel Kurdybacha Date: Sat, 14 Apr 2018 14:06:32 +0100 Subject: [PATCH] Problem: extended initializer lists only available in C++11 --- tests/message.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/message.cpp b/tests/message.cpp index 5cd8fd9..ddfb2ef 100644 --- a/tests/message.cpp +++ b/tests/message.cpp @@ -8,23 +8,23 @@ TEST (message, create_destroy) TEST (message, constructors) { - const std::string hi {"Hi"}; - zmq::message_t hi_msg_a {hi.begin (), hi.end ()}; + const std::string hi ("Hi"); + zmq::message_t hi_msg_a (hi.begin (), hi.end ()); ASSERT_EQ (hi_msg_a.size (), hi.size ()); - zmq::message_t hi_msg_b {hi.data (), hi.size ()}; + zmq::message_t hi_msg_b (hi.data (), hi.size ()); ASSERT_EQ (hi_msg_b.size (), hi.size ()); ASSERT_EQ (hi_msg_a, hi_msg_b); #if defined(ZMQ_BUILD_DRAFT_API) && defined(ZMQ_CPP11) - zmq::message_t hello_msg_a {"Hello"}; + zmq::message_t hello_msg_a ("Hello"); ASSERT_NE (hi_msg_a, hello_msg_a); ASSERT_NE (hi_msg_b, hello_msg_a); - zmq::message_t hi_msg_c {hi}; + zmq::message_t hi_msg_c (hi); ASSERT_EQ (hi_msg_c, hi_msg_a); ASSERT_EQ (hi_msg_c, hi_msg_b); ASSERT_NE (hi_msg_c, hello_msg_a); #endif #ifdef ZMQ_HAS_RVALUE_REFS - zmq::message_t hello_msg_b{zmq::message_t{"Hello"}}; + zmq::message_t hello_msg_b(zmq::message_t("Hello")); ASSERT_EQ (hello_msg_a, hello_msg_b); #endif }