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

DR: Reference captures never refer to the capture #68

Open
hubert-reinterpretcast opened this issue Sep 22, 2019 · 2 comments
Open

DR: Reference captures never refer to the capture #68

hubert-reinterpretcast opened this issue Sep 22, 2019 · 2 comments

Comments

@hubert-reinterpretcast
Copy link

There is no adjustment to change references to a reference-captured entity to refer to anything else. It is not possible under the wording to reflect upon a reference capture, and when applying reflexpr upon a reference-captured function parameter, the entity being reflected upon is the function parameter. Note that the wording prohibiting reflection via declarations at block scope allows such reflection if the entity is captured (by some random lambda), but does not require reflection upon the capture as opposed to reflection upon the entity.

The ability to reflect upon function parameters of an enclosing function in captureless lambdas should also go away.

If no resolution is forthcoming, let me know, and I'll send a note to CWG.

@camio
Copy link

camio commented Jan 27, 2020

AN: I agree that's a wording defect, I agree that reflecting lambda captures
shouldn't open a loop hole into reflecting entities at block scope.

AN: Hubert, I would appreciate if you could suggest wording that enables
reflection of reference captures to reflect the capture, without allowing
reflection of referenced entities that are forbidden to be reflected.

AN: I would prefer this to be treated as an issue rather than as part of the review process.

HT: Agreed to treat this as an issue. Can we tag this as "cwg" (I can't seem to
edit the labels)?

@camio
Copy link

camio commented Jan 27, 2020

Left open as an issue to handle post-publication.

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

2 participants