Using a function as the second argument of a 'for' loop
<p>Let's assume I have the following code:</p>

<pre><code>for(std::vector&lt;int&gt;::iterator i = vect.begin(); i != vect.end(); ++i)
{
    //do smth here
}
</code></pre>

<p>Is vect.end() going to be re-called each iteration? If yes, how should I iterate a vector then?</p>

<p>Having a function called inside the logical expression (second argument of the for loop) is generally bad practice?</p>
