This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.

### 1414. Fixing remaining dead links to `POS_T` and `OFF_T`

Section: 23.2.4.4 [char.traits.specializations.char16.t] Status: C++11 Submitter: BSI Opened: 2010-08-25 Last modified: 2021-06-06

Priority: Not Prioritized

View all other issues in [char.traits.specializations.char16.t].

View all issues with C++11 status.

Duplicate of: 1444

Discussion:

Addresses GB-109, GB-123

It is not clear what the specification means for `u16streampos`, `u32streampos` or `wstreampos` when they refer to the requirements for `POS_T` in 21.2.2, as there are no longer any such requirements. Similarly the annex D.7 refers to the requirements of type `POS_T` in 27.3 that no longer exist either.

Clarify the meaning of all cross-reference to the removed type `POS_T`.

[ Post-Rapperswil, Daniel provides the wording. ]

When preparing the wording for this issue I first thought about adding both `u16streampos` and `u32streampos` to the [iostream.forward] header `<iosfwd>` synopsis similar to `streampos` and `wstreampos`, but decided not to do so, because the IO library does not yet actively support the `char16_t` and `char32_t` 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 `fpos<mbstate_t>`, as for `streampos` and `wstreampos`, so there is no loss for users that would like to use the proper `fpos` instantiation for these character types.

Additionally the way of referencing was chosen to follow the style suggested by NB comment GB 108.

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

[ Adopted at 2010-11 Batavia ]

Proposed resolution:

The following wording changes are against N3126.

1. Change [char.traits.specializations.char16_t]p.1 as indicated:

   > 1 - The type `u16streampos` shall be an implementation-defined type that satisfies the requirements for `POS_T` in 21.2.2 `pos_type` in [iostreams.limits.pos].

2. Change [char.traits.specializations.char32_t]p.1 as indicated:

   > 1 - The type `u32streampos` shall be an implementation-defined type that satisfies the requirements for `POS_T` in 21.2.2 `pos_type` in [iostreams.limits.pos].

3. Change [char.traits.specializations.wchar.t]p.2 as indicated:

   > 2 - The type `wstreampos` shall be an implementation-defined type that satisfies the requirements for `POS_T` in 21.2.2 `pos_type` in [iostreams.limits.pos].

4. Change [fpos.operations], Table 124 — Position type requirements as indicated:

   > Table 124 — Position type requirements
   > Expression | Return type | `...`
   > --- | --- | ---
   > `...` | `...` | `...`
   > `O(p)` | `OFF_T` `streamoff` | ...
   > `...` | `...` | `...`
   > `o = p - q` | `OFF_T` `streamoff` | `...`
   > `streamsize(o)` `O(sz)` | `streamsize` `OFF_T` `streamoff` | `...`

5. Change [depr.ios.members]p.1 as indicated:

   >     namespace std {
   >      class ios_base {
   >      public:
   >        typedef T1 io_state;
   >        typedef T2 open_mode;
   >        typedef T3 seek_dir;
   >        typedef OFF_Timplementation-defined streamoff;
   >        typedef POS_Timplementation-defined streampos;
   >        // remainder unchanged
   >      };
   >     }

6. Change [depr.ios.members]p.5+6 as indicated:

   > 5 - The type `streamoff` is an implementation-defined type that satisfies the requirements of type `OFF_T` (27.5.1)`off_type` in [iostreams.limits.pos].

   > 6 - The type `streampos` is an implementation-defined type that satisfies the requirements of type `POS_T` (27.3)`pos_type` in [iostreams.limits.pos].