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

[expr.const] Immediate-escalating clarification. #7597

Open
rj2k000 opened this issue Jan 29, 2025 · 3 comments
Open

[expr.const] Immediate-escalating clarification. #7597

rj2k000 opened this issue Jan 29, 2025 · 3 comments

Comments

@rj2k000
Copy link

rj2k000 commented Jan 29, 2025

The standard should have some example code demonstrating the following.
In particular, i find it hard to visualize code for the second case, and could only guess one example for the first case, which i don't really know if that was the intention.


An expression or conversion is immediate-escalating if it is not initially in an immediate function context and
it is either
— a potentially-evaluated id-expression that denotes an immediate function that is not a subexpression of
an immediate invocation, or
— an immediate invocation that is not a constant expression and is not a subexpression of an immediate
invocation.

@jensmaurer
Copy link
Member

The standard is not a tutorial.

Please read the WG21 paper that added immediate-escalating functions: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2564r3.html

There should be examples there. Also, https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3496r0.html shows an area where P2564 didn't do enough, and has an example at the top that might be core-ified to yield a suitable example.

Feel free to post a pull request once you've collected suitable examples.

@rj2k000
Copy link
Author

rj2k000 commented Jan 29, 2025

Is there a place that shows which papers each part of the standard is created from ?
(apart from simply downloading all the papers and reading them)

@jensmaurer
Copy link
Member

"git log" and "git blame" works quite well.

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