Loop over ALL the values
<p>This might be an odd question, but how does one nicely loop over ALL values of a type.  In particular the standard integral types such as <code>unsigned short</code>.  A normal <code>for</code> loop construct presents a difficulty: what condition to use to exit the loop - because all values are valid.</p>

<p>Of course, there are several ways to get the job done.  Exit on the last value then handle that after the loop.  Use a bigger int to count.  The question is, is there a more elegant way?</p>
