As pointed out in other questions here on SO, equality comparison between two iterators from different containers is UB.
In my case I have two list iterators, which might not be from the same container:
std::list< int >::iterator a, b;
Suppose that I know for sure that none of them is an end iterator, my question is if I am allowed to do:
&(*a) == &(*b)