[expr.prim.id.unqual]/14 "sequenced before" with "postcondition assertion"

Open Beginner friendly
#9,285 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
documentation

Research direction

Locate [expr.prim.id.unqual]/14 in the draft and compare its wording with bullet (13.1), especially the sequencing phrase. Update the postcondition wording to refer to evaluation, then verify it matches the terminology introduced by P2900R12 and the surrounding paragraph.

Written by the indexing model from the issue text.

Description

P1-Important

[expr.prim.id.unqual]/14 says

If an id-expression E names a result binding in a postcondition assertion and the implementation introduces any temporary objects to hold the result object as specified in [class.temporary], and the postcondition assertion is sequenced before the initialization of the result object ([expr.call]), E refers to the most recently initialized such temporary object.

It should be "evaluation of the postcondition assertion", like in [expr.prim.id.unqual] bullet (13.1)

if the contract assertion is a precondition assertion and the evaluation of the precondition assertion is sequenced before the initialization of the parameter object, E refers to the most recently initialized such temporary object, and ...

Edit: P2900R12 introduced this wording.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
17h 45m
Merged PRs (30d)
34

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cplusplus/draft

All issues in cplusplus/draft

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.