Apply suggestions from code review

Co-Authored-By: gummif <ofpgummi@yahoo.com>
This commit is contained in:
Simon Giesecke 2019-05-08 21:37:14 +00:00 committed by GitHub
parent 3d4be814e8
commit 9a60ad3fc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -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";

View File

@ -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<typename T>
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<send_flags>(static_cast<int>(a) | static_cast<int>(b));
return static_cast<send_flags>(static_cast<std::underlying_type<send_flags>::type>(a)
| static_cast<<std::underlying_type<send_flags>::type>(b));
}
enum class recv_flags : int