
5 Dec
2012
5 Dec
'12
12:48 p.m.
On Wed, Dec 5, 2012 at 1:42 PM, "Claas H. Köhler" <claas.koehler@dlr.de> wrote:
Thanks for the info. That's very interesting. So it seems to be implementation dependent. Using gcc-4.7 the following code outputs true/ 1 for all 5 comparisons.
std::vector<double>::iterator itv1, itv2; std::string::iterator itstr1, itstr2; std::set<double>::iterator its1, its2; std::map<double, double>::iterator itm1, itm2; std::list<double>::iterator itl1, itl2;
std::cout << (its1 == its2) <<std::endl << (itv1 == itv2) <<std::endl << (itstr1 == itstr2) <<std::endl << (itm1 == itm2) <<std::endl << (itl1 == itl2) <<std::endl;
Did you try to enable iterator debugging? Anyway, this can't be relied on. -- Olaf