zeromq / cppzmq

Header-only C++ binding for libzmq
http://www.zeromq.org
MIT License
1.97k stars 757 forks source link

Problem: if constexpr warnings on MSVC #460

Closed gummif closed 3 years ago

gummif commented 4 years ago

Solution: Use if constexpr where possible in C++17

sigiesec commented 3 years ago

It's not clear to me which specific warnings this fixes, but while this adds some complexity that doesn't seem strictly necessary, I am fine with this.

Can you rebase the PR please, so we can see the CI working after the catch fix?

gummif commented 3 years ago

If I remember correctly then I get this warning where I use the library https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4127?view=msvc-160 . I will rebase it.