<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 1414: Fixing remaining dead links to POS_T and OFF_T</title>
<meta property="og:title" content="Issue 1414: Fixing remaining dead links to POS_T and OFF_T">
<meta property="og:description" content="C++ library issue. Status: C++11">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue1414.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#C++11">C++11</a> status.</em></p>
<h3 id="1414"><a href="lwg-defects.html#1414">1414</a>. Fixing remaining dead links to <code>POS_T</code> and <code>OFF_T</code></h3>
<p><b>Section:</b> 27.2.4.4 <a href="https://wg21.link/char.traits.specializations.char16.t">[char.traits.specializations.char16.t]</a> <b>Status:</b> <a href="lwg-active.html#C++11">C++11</a>
 <b>Submitter:</b> BSI <b>Opened:</b> 2010-08-25 <b>Last modified:</b> 2021-06-06</p>
<p><b>Priority: </b>Not Prioritized
</p>
<p><b>View all other</b> <a href="lwg-index.html#char.traits.specializations.char16.t">issues</a> in [char.traits.specializations.char16.t].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#C++11">C++11</a> status.</p>
<p><b>Duplicate of:</b> <a href="lwg-closed.html#1444" title="OFF_T is not defined (Status: Dup)">1444</a></p>
<p><b>Discussion:</b></p>
<p><b>Addresses GB-109, GB-123</b></p>

<p>
It is not clear what the specification means for
<code>u16streampos</code>, <code>u32streampos</code> or <code>wstreampos</code> when they
refer to the requirements for <code>POS_T</code> in 21.2.2, as there
are no longer any such requirements. Similarly the annex
D.7 refers to the requirements of type <code>POS_T</code> in 27.3 that
no longer exist either.
</p>
<p>
Clarify the meaning of all cross-reference to the
removed type <code>POS_T</code>.
</p>


<p><i>[
Post-Rapperswil, Daniel provides the wording.
]</i></p>


<p>
When preparing the wording for this issue I first thought about adding both <code>u16streampos</code> and <code>u32streampos</code>
to the [iostream.forward] header <code>&lt;iosfwd&gt;</code> synopsis similar to <code>streampos</code> and <code>wstreampos</code>,
but decided not to do so, because the IO library does not yet actively support the <code>char16_t</code> and <code>char32_t</code>
character types. Adding those would misleadingly imply that they would be part of the iostreams. Also, the addition
would make them also similarly equal to a typedef to <code>fpos&lt;mbstate_t&gt;</code>, as for <code>streampos</code> and
<code>wstreampos</code>, so there is no loss for users that would like to use the proper <code>fpos</code> instantiation for
these character types.
</p>
<p>
Additionally the way of referencing was chosen to follow the style suggested by NB comment
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3118.html#GB108">GB 108</a>.
</p>

<blockquote><p>
Moved to Tentatively Ready with proposed wording after 5 positive votes on c++std-lib.
</p></blockquote>

<p><i>[
Adopted at 2010-11 Batavia
]</i></p>




<p id="res-1414"><b>Proposed resolution:</b></p>
<p>
<i>The following wording changes are against N3126.</i>
</p>

<ol>
<li><p>Change [char.traits.specializations.char16_t]p.1 as indicated:</p>
<blockquote><p>
1 - The type <code>u16streampos</code> shall be an implementation-defined type that satisfies the requirements
for <del><code>POS_T</code> in 21.2.2</del><ins><code>pos_type</code> in [iostreams.limits.pos]</ins>.
</p></blockquote>
</li>
<li><p>Change [char.traits.specializations.char32_t]p.1 as indicated:</p>
<blockquote><p>
1 - The type <code>u32streampos</code> shall be an implementation-defined type that satisfies the requirements
for <del><code>POS_T</code> in 21.2.2</del><ins><code>pos_type</code> in [iostreams.limits.pos]</ins>.
</p></blockquote>
</li>
<li><p>Change [char.traits.specializations.wchar.t]p.2 as indicated:</p>
<blockquote><p>
2 - The type <code>wstreampos</code> shall be an implementation-defined type that satisfies the requirements
for <del><code>POS_T</code> in 21.2.2</del><ins><code>pos_type</code> in [iostreams.limits.pos]</ins>.
</p></blockquote>
</li>
<li><p>Change [fpos.operations], Table 124 &mdash; Position type requirements as indicated:</p>
<blockquote>
<table border="1">
<caption>Table 124 &mdash; Position type requirements</caption>

<tbody>
<tr>
<th>Expression</th>
<th>Return type</th>
<th><code>...</code></th>
</tr>

<tr>
<td><code>...</code></td>
<td><code>...</code></td>
<td><code>...</code></td>
</tr>
<tr>
<td><code>O(p)</code></td>
<td><del><code>OFF_T</code></del><ins><code>streamoff</code></ins></td>
<td>...</td>
</tr>
<tr>
<td><code>...</code></td>
<td><code>...</code></td>
<td><code>...</code></td>
</tr>
<tr>
<td><code>o = p - q</code></td>
<td><del><code>OFF_T</code></del><ins><code>streamoff</code></ins></td>
<td><code>...</code></td>
</tr>
<tr>
<td><code>streamsize(o)</code><br/><code>O(sz)</code></td>
<td><code>streamsize</code><br/><del><code>OFF_T</code></del><ins><code>streamoff</code></ins></td>
<td><code>...</code></td>
</tr>

</tbody></table>
</blockquote>
</li>
<li><p>Change [depr.ios.members]p.1 as indicated:</p>
<blockquote><pre>
namespace std {
 class ios_base {
 public:
   typedef T1 io_state;
   typedef T2 open_mode;
   typedef T3 seek_dir;
   typedef <del>OFF_T</del><ins><em>implementation-defined</em></ins> streamoff;
   typedef <del>POS_T</del><ins><em>implementation-defined</em></ins> streampos;
   // remainder unchanged
 };
}
</pre></blockquote>
</li>
<li><p>Change [depr.ios.members]p.5+6 as indicated:</p>
<blockquote><p>
5 - The type <code>streamoff</code> is an implementation-defined type that satisfies the requirements
of <del>type <code>OFF_T</code> (27.5.1)</del><ins><code>off_type</code> in [iostreams.limits.pos]</ins>.
</p>
<p>
6 - The type <code>streampos</code> is an implementation-defined type that satisfies the requirements
of <del>type <code>POS_T</code> (27.3)</del><ins><code>pos_type</code> in [iostreams.limits.pos]</ins>.
</p></blockquote>
</li>
</ol>






</body>
</html>
