看白书的时候想了下这个问题.
大概是这样,恍然大悟。
一般函数范围在[first,end),左闭右开。end指的是指向尾部,最后一个元素之后。
ISO C++ Standard (ISO14882) 23.1.7:begin() returns an iterator referring to the first element in the container. end() returns an iterator which is the past-the-end value for the container. If the container is empty, then begin() == end();