Skip to content

US 9-024 5.11, 6.09.1, 7.5.6.2, 11.1, 11.2, 16.4.6.11, 21.3, 21.4, A.9, C.1.4, C.1.6 Excise "replaceable type" #598

@wg21bot

Description

@wg21bot

The new notion of "replaceable types" (6.9.1) is confusingly similar to the existing notions of "transparently replaceable objects" (6.8.4) and "replaceable functions", such as replaceable allocation functions (9.6.5) and replaceable contract-violation handlers (6.11.3).

The new notion of "replaceable" is not used by any C++26 library machinery. Therefore it does not need to exist in C++26. The proposed change is entirely removal of various terms of art all of which are dangling loose ends. The removal of this type trait has no effect on the rest of C++. There are 88 instances of the string "replaceab" in the Committee Draft. Adopting the proposed change will remove-36 instances concerned with "replaceable_if_eligible" leaving:

  • instances concerned with "system_context_replaceability"
  • 4 concerned with "transparently replaceable"
  • 35 instances concerned with replaceable functions

Proposed change:

Adopt P3827 R0 "Wording for US NB comment 9", which proposes the following edits only:

In 5.11: Strike "replaceable_if_eligible" from Table 4.In 6.9.1: Strike the sentence "Cv-unqualified scalar types, replaceable class types (11.2), and arrays of such types are collectively called replaceable types."In 7.5.6.2: Strike "whether the closure type is replaceable (11.2), or"In 11.1: Strike "replaceable_if_eligible" from the grammar. Replace the words "trivially_relocatable_if_eligible, or replaceable_if_eligible" with "or trivially_relocatable_if_eligible".Strike 11.2/6 and 11.2/7 in their entirety. Strike "or replaceability" from Note 2 and "or replaceable" from Note 3.Strike 16.4.6.11/3 in its entirety.In 21.3.3: Strike "is_replaceable" and "is_replaceable_v".In 21.3.6.4: Strike "is_replaceable" from Table 54.In 21.4.1: Strike "is_replaceable_type".In 21.4.17: Strike "is_replaceable_type".In A.9: Strike "replaceable_if_eligible".In C.1.4: Strike the words "and replaceable_if_eligible". Strike the words "and replaceable". In Example 1, replace "replaceable_if_eligible" with "trivially_relocatable_if_eligible".In C.1.6: Strike the words "or replaceable_if_eligible".Alternatively, adopting all of P1144 R13 "std::is_trivially_relocatable" would moot this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EWGEvolution

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions