-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Fix MSVC compilation error on EVMVersion
comparison
#15675
base: develop
Are you sure you want to change the base?
Conversation
Thank you for your contribution to the Solidity compiler! A team member will follow up shortly. If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother. If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix. |
Hi @gmh5225, thank you for your contribution. Could you please clarify what kind of compilation error you encountered on MSVC? The changes in the PR seem unnecessary to me. The solidity/liblangutil/EVMVersion.h Lines 47 to 49 in 13943d9
solidity/liblangutil/EVMVersion.h Lines 98 to 99 in 13943d9
Maybe it is a Boost-related issue? Could you please provide some description of the problem you are facing so we can better understand and address it? |
The error is: The issue is not Boost-related. While the class has overloaded operator== and operator<, it doesn't have an overloaded operator>=. The issue can be reproduced in Debug mode with MSVC. |
EVMVersion
comparison
This is comparing the object with a number. We don't have an operator defined for that so it must be working only due to some implicit conversion. Not sure why only MSVC would be choking on that, probably some subtle implementation difference between compilers, but a cleaner way to fix it would be something like: |
EVMVersion
comparisonEVMVersion
comparison
No description provided.