cplusplus / cplusplus/draft

[stmt.return] p3 The context of the invocation of the potentially invoked destructor is unspecified

Open
#4,820 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

[stmt.return] p3

The destructor for the result object is potentially invoked ([class.dtor], [except.ctor]).

[class.dtor] p15

A program is ill-formed if a destructor that is potentially invoked is deleted or not accessible from the context of the invocation.

For [stmt.return] p3, What is the context of the invocation for it?

Infer from the example under [stmt.return] p3, Should it be that?

The destructor for the result object is potentially invoked ([class.dtor], [except.ctor]). In this case, the context of the invocation is the context of the return statement.

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.

Research direction

Start with [stmt.return] p3 and [class.dtor] p15 in the draft, then compare the existing example under [stmt.return] p3 with the question about the invocation context. Trace the relevant standard wording and determine whether the context is specified; done means the issue is resolved by a clear wording decision in the draft.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, tex
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.