[Effective-cpp] Item 1: Uses and Abuses of vector

Gregory Haley ghaley at venaca.com
Wed Oct 27 11:02:09 EDT 2004


> To mention another thing in the formula I dislike, is the 
> redundant vector<int>.
> 
> for (vint.const_iterator it = vint.begin() ...) or for 
> (vint::const_iterator it = vint.begin() ...)
> 
> Would remove that.

Very cool.  I had never considered it that way -- and I think it helps make
the provenance of the iterator a little clearer.

ciao!
greg.

Gregory Haley

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.779 / Virus Database: 526 - Release Date: 10/19/2004
 




More information about the Effective-cpp mailing list