-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use std::size in place of std::extent #3403
Conversation
HowardHinnant
commented
May 14, 2020
- Fixes RIPD-269
* Fixes RIPD-269
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.
👍 Nice simplification!
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.
Looks good to me
src/test/core/SociDB_test.cpp
Outdated
int dbInitCount = std::extent<decltype(dbInit)>::value; | ||
for (int i = 0; i < dbInitCount; ++i) | ||
auto dbInitCount = std::size(dbInit); | ||
for (auto i = 0u; i < dbInitCount; ++i) |
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.
No change needed, but why not for (auto const s : dbInit)
?
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.
That would be good too. I'll go ahead and change it. I was so intent on just doing the mechanical change at hand I didn't take my blinders off and look at the surrounding code.