Skip to content

Split [class.temporary] #8206

Open
Open

Description

@t3nsor

[class.temporary] talks about two very different kinds of temporaries: the most well-known ones, which are created by temporary materialization, and the much less well-known ones, which are created at the implementation's discretion to store function parameters and return values in registers.

It would be helpful to be able to cross-reference the latter specifically, for example in Example 2 to [dcl.contract.res]. We can't currently do that because we can't cross-reference a particular paragraph within a section.

My suggestion is that we create a new subsection [class.temporary.general] which contains current paragraph 1, followed by [class.temporary.materialization] which contains current paragraph 2, followed by [class.temporary.function] which contains current paragraph 3, and finally [class.temporary.lifetime] which contains all remaining paragraphs.

This is proposed to become part of #7399

Activity

  1. jensmaurer commented on Sep 2, 2025

    @jensmaurer
    Member

    I don't think a simple split of a single subclause is tied to the general clause reorganization; the former can be done at any time.

    I don't particularly like the single-paragraph subdivision proposed here, though. Maybe we can move the lifetime rules into .general ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-OtherTriaged issue not in P1 or P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions