-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSVC Warning: error C4127: conditional expression is constant #727
Comments
Before the codebase switches to C++17, I'm afraid, there is no cleaner way to get rid of this warning than |
Just for consideration: If the FollowIsolatedPoints is the only problem here, something like the following might not be too intrusive: (TL;DR: the patch splits the condition and uses the BOOST_IF_CONSTEXPR macro for the constant expression) I admit that it is not very pretty, but it should get rid of the warning if I understand correctly (I don't have the proprietary software that was mentioned in the issue, so I can't test it myself). The other option I see would involve partial template specialization but that would probably require at least 10 lines of boilerplate, so that couldn't be considered clean either. |
Well, there is this macro: |
I can confirm that this warning no longer occurs with 1.75.0. Thank you! |
Compiling with boost 1.73.0, MSVC 2017 Version 15.8.0 with compiler options /W4 and /std:c++latest, I get "conditional expression is constant" in two places:
and
The text was updated successfully, but these errors were encountered: