Using auto instead of container::const_iterator#3195
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.
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
| // 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.
Would a range-based for loop be OK here as well? (Just asking. I'm not a maintainer.)
|
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 <wltu@google.com>
Fixes #3194