Location
  • United Kingdom

Top Contributors

Welcome to the C/C++ discussion group

This group can be used to discuss anything related to C/C++ and may also be used by experts to request help from other experts if they need backup in  particularly difficult questions. This group is not a place to bitch and moan, it's a place to collaborate and exchange ideas. Disagreements are welcome, but please be respectful to your fellow members.
 
Rank: Genius

Expert Comment

phoffric2018-04-25 10:57 AMID: 2154323
>> they need backup in  particularly difficult questions
https://www.experts-exchange.com/questions/29096323/c-03-STL-find-if-reverse-to-find-last-matching-item.html

Based upon the current discussion, this C++03 find_if question using predicate on a vector of pointers to struct may qualify.

This is a partial solution for an C++03 array of pointers to struct.
https://stackoverflow.com/questions/17201522/how-do-you-use-find-if-along-with-reverse-iterator-on-a-c-style-array?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

But when using a vector or list, I have compiler errors.

Although the ideone code shows a vector being used, that may likely change to a different container. Using a vector, I think I could use its underlying contiguous array, which is not available in another container.
0