-
Notifications
You must be signed in to change notification settings - Fork 61
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 GCC complaints #2400
🧹 Fix GCC complaints #2400
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using std::begin; using std::end;
are brought in scope such that ADL works for types that have an overload for begin()
, see https://en.cppreference.com/w/cpp/iterator/begin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I think all of our containers use a member of begin
, it's the proper way.
Co-authored-by: boeschf <[email protected]>
Co-authored-by: boeschf <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Tree
Fixes --- likely a spurious --- warning in
tree.cpp
:Also use
iota
to generate contiguous indices.Tests
test_simd.cpp
GCC doesn't acknowledge that
simd v[i] = x
for alli = 0 ... len(v)
initializesv
. Force initialization to zero.test_network_generation.cpp
Compare across signs
test_distributed_for_each.cpp
Compare across signs; resolve by casting to correct type.
test_range.cpp
GCC really turns the dial up to 11 here, complaining about oob access in
Same happens with
std::sort(str, str + strlen(str))
, so I am pretty sure this is not a real thing.For reference:
I am still going to 'fix' this, since I am for warning free code and don't want to annotate with a pragma.
General
Remove spurious includes.