I'm currently learning STL and I got some uncertainities about find and const iterators. Let's say I have a find function:
some_stl_container::const_iterator found = myContainer.find(value);
After that should I check what I got for found
against another const_iterator, or is it
valid to make a check against simply an iterator.
Basically would there be any difference between doing this:
if(found!=myContainer.cend())
and this:
if(found!=myContainer.end())
The first looks more accurate(at least to me), but the second should work fine too, right?