Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xmh0511 opened this issue Aug 18, 2021 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Aug 18, 2021

[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.

@xmh0511 xmh0511 changed the title [stmt.return] p3 The context of the invocation of the return statement is unspecified [stmt.return] p3 The context of the invocation of the potentially destructor is unspecified Aug 18, 2021
@xmh0511 xmh0511 changed the title [stmt.return] p3 The context of the invocation of the potentially destructor is unspecified [stmt.return] p3 The context of the invocation of the potentially invoked destructor is unspecified Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant