[expr.const] Immediate-escalating clarification.
Closed this issue · 4 comments
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.
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.
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)
"git log" and "git blame" works quite well.
Thankyou for the reference to the papers which i have read.
I'll wget all the papers so i can grep through them for keywords.