I've wrapped my custom type 'MyType' in a smart pointer:
tr1::shared_ptr<MyType>
and made a vector from it:
vector<shared_ptr<MyType>>
Now I want to std::find
an object of type MyType
in that vector but can't since the type I'd need would be shared_ptr<MyType>
.
Is there an elegant way? Thank you
Update: Why not std::find_if: The usage of std::find is pretty compact. I thought implementing a method or functor for find_if would be a too large overhead.