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

4178. writable is no longer a term of power

Section: 24.3.1 [iterator.requirements.general], 24.3.5.1 [iterator.cpp17.general], 26.7.5 [alg.replace], 26.7.6 [alg.fill], 26.7.8 [alg.remove], 26.7.9 [alg.unique], 26.7.12 [alg.random.sample], 26.8.2.4 [partial.sort.copy], 26.8.5 [alg.partitions], 26.10.7 [partial.sum], 26.10.12 [adjacent.difference], 29.5.8.1 [rand.util.seedseq] Status: NAD Editorial Submitter: Alisdair Meredith Opened: 2024-11-27 Last modified: 2024-12-04

Priority: Not Prioritized

View all other issues in [iterator.requirements.general].

View all issues with NAD Editorial status.

Discussion:

There are a numerous algorithms that mandate an iterator is "writable (24.3.1 [iterator.requirements.general])": e.g., for the std::fill algorithm, 26.7.6 [alg.fill] 26.7.6p2

Mandates: The expression value is writable (24.3.1 [iterator.requirements.general]) to the output iterator.

However, checking 24.3.1 [iterator.requirements.general] I can find no definition for the term "writable". Checking past standards, I found that in C++17 we have the following definition:

An output iterator i has a non-empty set of types that are writable to the iterator;

However, when we introduced the concept-based iterator taxonomy, this definition was replaced by:

An output iterator i has a non-empty set of types that are indirectly_writable to the iterator;

where the term of power is no longer defined, but a concept is used to define the relationship between iterator and value instead. We need to either find and fix each reference to "writable" (or more properly "writable to" — the old term is a relationship between two types, not a property of just one) using the indirectly_writable concept, or restore a definition of the term of power — likely phrased in terms of the indirectly_writable concept.

Daniel:

It seems that the editorial direction of P1878R1 accepted in Belfast 2019,

Change stable name [iterator.concept.writable] to [iterator.concept.indirectly.writable] and globally replace all occurrences of "writable" (the concept) with "indirectly_writable"

has either been incorrectly applied 24.3.1 [iterator.requirements.general] (because that position did not actually refer to the writable concept) or if the interpretation that the original writable definition from 24.3.1 [iterator.requirements.general] was intended to be aliased with the writable concept this substitution has been incompletely applied to the working draft.

[2024-12-04 Status changed: New → NAD Editorial.]

Proposed resolution: