
On Nov 25, 2011, at 1:07 PM, andpar83@gmail.com wrote:
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());
How could they be? Consider the following code: std::vector<int> v1, v2; std::vector::iterator i1; Should i1 == v1.end () or i1 == v2.end () be true? (they cannot both be true) -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki