| 135 | /// @param last2 - second collection end iterator |
| 136 | template<class BidirectionalIterator1, class ForwardIterator2> |
| 137 | inline BidirectionalIterator1 |
| 138 | find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, |
| 139 | ForwardIterator2 first2, ForwardIterator2 last2 ) |
| 140 | { |
| 141 | if( first1 == last1 || first2 == last2 ) |
| 142 | return last1; |
| 143 | |
| 144 | BidirectionalIterator1 it1 = last1; |
| 145 | while( --it1 != first1 && std::find( first2, last2, *it1 ) == last2 ) {} |
| 146 | |
| 147 | return it1 == first1 && std::find( first2, last2, *it1 ) == last2 ? last1 : it1; |
| 148 | } |
| 149 | |
| 150 | //____________________________________________________________________________// |
| 151 |
no test coverage detected