Boost logo

Boost Users :

Subject: [Boost-users] [unordered] Iterator default constructor usage
From: andpar83_at_[hidden]
Date: 2011-11-25 16:07:25


Hi all.

Is it a correct usage of default constructor of iterators? Are any
gurantees that it will always equals to the iterator returned by
end()? :

       typedef boost::unordered_map<std::string, int> map;
       map x;
       x["one"] = 1;

       assert(x.find("missing") == x.end());
       assert(x.find("missing") == map::iterator());
       assert(map::iterator() == x.end());

Andrey


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net