Skip to content

Move [expected] from [utilities] to [diagnostics] #6168

@ben-craig

Description

@ben-craig

The [utilties] clause should be a clause of last resort, when no other clause makes sense. Additionally, the [utilties] clause has historically been one of the larger clauses.

I recommend moving [expected] from [utilities] to [diagnostics]. std::expected is a tool most frequently used for error handling, so placing it in the same clause that we use to discuss errno and terminate makes sense.

Without this change, [diagnostics] is roughly 20 pages in N4928 and [utilities] is roughly 145 pages. Moving [expected] can shift ~31 pages from [utilities] to [diagnostics].

The header table in each clause would need to be adjusted. Other than that, I didn't see any blanket wording in [utilities] that needs to be moved or duplicated into [diagnostics]. [diagnostics.general] p2 may need a minor tweak to describe std::expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions