7 Aug
2009
7 Aug
'09
1:14 p.m.
Frank Mori Hess wrote:
On Thursday 06 August 2009, Ryan McConnehey wrote:
Is it possible to have std::find compare the class that the shared_ptr is pointing too?
It would probably be easier to use std::find_if()
Or see: http://www.boost.org/doc/libs/1_39_0/libs/iterator/doc/indirect_iterator.htm... MyContOfPtrs::iterator itr = std::find( make_indirect_iterator(myContOfPtrs.begin()) , make_indirect_iterator(myContOfPtrs. end()) , AnInstance).base(); note call .base() on the return value from std::find to get the original iterator. Jeff