In a function, I work with a std::list<Type>::const_iterator
. I don't have access to the container.
Is there a way to check if the iterator point to an accessible element (i.e. the iterator is not at the end of the container) ?
Note: I use C++11 (I don't want solution for C++ >= 14)
No.
An iterator devoid of context is useless. Usually you will have a pair of iterators, denoting the range of interest.