Weirdness in C++03 seekoff() and seekpos() specification
<p>I am creating my own <code>streambuf</code> subclass and using the C++03 spec (ISO/IEC 14882:2003) as a reference.</p>

<p>In section 27.5.2.4.2 [lib.streambuf.virt.buffer], the specifications for both <code>basic_streambuf::seekoff()</code> and <code>basic_streambuf::seekpos()</code> say:</p>

<blockquote>
  <p><strong>Default behavior:</strong> Returns pos_type(off_type(-1)).</p>
</blockquote>

<p>Now, I thought <code>off_type</code> was supposed to be a signed integral type and <code>pos_type</code> was supposed to be an unsigned integral type, so it seems to me this expression has to be equivalent to just <code>pos_type(-1)</code>.</p>

<p>But supposing I am mistaken, and these types might be some other combination of signed and unsigned...  Then I still cannot figure out any possible use for this double cast.</p>

<p>For example, if both are signed, then again the expression is equivalent to <code>pos_type(-1)</code>.</p>

<p>If <code>pos_type</code> were signed and <code>off_type</code> were unsigned -- which makes no sense, but bear with me -- then at best this double cast would shove some huge value into <code>pos_type</code> and at worst it would invoke undefined behavior by overflowing the signed <code>pos_type</code> integer.</p>

<p>Does anyone know the standard's rationale for specifying <code>pos_type(off_type(-1))</code> here instead of just <code>pos_type(-1)</code>?  If not, can you even imagine a plausible rationale?</p>
