Problem: if constexpr warnings on MSVC

Solution: Use if constexpr where possible in C++17
This commit is contained in:
Gudmundur Adalsteinsson
2020-10-25 09:24:16 +00:00
parent 18db4568f9
commit a7889af4bf
2 changed files with 9 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ recv_multipart_n(socket_ref s, OutputIt out, size_t n, recv_flags flags)
size_t msg_count = 0;
message_t msg;
while (true) {
if (CheckN) {
if ZMQ_CONSTEXPR_IF (CheckN) {
if (msg_count >= n)
throw std::runtime_error(
"Too many message parts in recv_multipart_n");