-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Using auto instead of container::const_iterator #3195
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
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@googlebot I fixed it. |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
1 similar comment
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
// Implemented as an explicit loop since std::count_if() in libCstd on | ||
// Solaris has a non-standard signature. |
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.
Just wondering, would this workaround (a hand-written "count-if", below here) still be necessary, or is std::count_if
nowadays fine on any supported platform? The workaround was introduced by zhanyong.wan, April 12, 2011 "Fixes Sun C++ compiler errors (by Pasi Valminen)", b8c0e16
@@ -4597,7 +4594,7 @@ UnorderedPointwise(const Tuple2Matcher& tuple2_matcher, | |||
|
|||
// Create a matcher for each element in rhs_container. | |||
::std::vector<internal::BoundSecondMatcher<Tuple2Matcher, Second> > matchers; | |||
for (typename RhsStlContainer::const_iterator it = rhs_stl_container.begin(); | |||
for (auto it = rhs_stl_container.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.
Would a range-based for
loop be OK here as well? (Just asking. I'm not a maintainer.)
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.
I think so!
Any progress getting this approved/merged? As stated by the linked issues this is preventing gtest from being used with gsl::span. |
would need this as well! :) |
Any news on when this will be merged? |
Ran across this issue today, +1 for merging this! |
PiperOrigin-RevId: 398271948
The std::span does not support some gtest MACROS and is fixed in google/googletest#3195 and google/googletest@e4717df Including the fixes to support std::span in gtests. Match the openembedded gtest version in openembedded/meta-openembedded#564 Change-Id: Ia0171160ee7a0a36c2fb27eb441e25cdec9ba9f1 Signed-off-by: Willy Tu <[email protected]>
Fixes #3194