Handle matters of trivial syntax #177
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Matt (@mborland)
I really appreciate your work on
cppallicnace/int128
. It is looking really good so far.The purpose of this PR is to address matters of trivial syntax. It involves 3 main things.
-Wpedantic
. You don't have this warning in CI, probably on purpose. This was the only-Wpedantic
warning that I found in my brief trials.(numeric_limits<T>::min)()
and(numeric_limits<T>::max)()
from the MSVC<windows.h>
header which actually#define
s macros formin()
andmax()
. This is a standard boost workaround and there is even a CI style checker that fails CI if the shielding parentheses are absent.There is a fourth item I observed. In Knuth long division here, there is a right-shift of signed
int64_t
. This requires an arithmetic right shift. In the old days, signed right shift was not guaranteed to properly handle the sign-bit (although I never encountered a compiler that did not properly do arithmetic right shift). It is, however, I believe worth pointint out. I know that is a speed-critical routine, so it's maybe in the area of don't care?