From 9a60ad3fc8b3a2e5fb3c8759f99d6a41f4ddb60e Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Wed, 8 May 2019 21:37:14 +0000 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: gummif --- tests/socket.cpp | 2 +- zmq.hpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/socket.cpp b/tests/socket.cpp index ed00739..80962b1 100644 --- a/tests/socket.cpp +++ b/tests/socket.cpp @@ -48,7 +48,7 @@ TEST_CASE("socket swap", "[socket]") } TEST_CASE("rass", "[socket]") { -zmq::context_t ctx; + zmq::context_t ctx; zmq::socket_t sock(ctx, zmq::socket_type::push); sock.bind("inproc://test"); const std::string m = "Hello, world"; diff --git a/zmq.hpp b/zmq.hpp index d6c6170..c3d262e 100644 --- a/zmq.hpp +++ b/zmq.hpp @@ -280,7 +280,7 @@ class message_t } #if defined(ZMQ_BUILD_DRAFT_API) && defined(ZMQ_CPP11) - // this function is too greedy, must add + // TODO: this function is too greedy, must add // SFINAE for begin and end support. template explicit message_t(const T &msg_) : message_t(std::begin(msg_), std::end(msg_)) @@ -654,7 +654,8 @@ enum class send_flags : int constexpr send_flags operator|(send_flags a, send_flags b) noexcept { - return static_cast(static_cast(a) | static_cast(b)); + return static_cast(static_cast::type>(a) + | static_cast<::type>(b)); } enum class recv_flags : int