I only saw "built-in functions" in C ++, but never included constant values.
The closest approximation to constRust is enumin C ++.
What is a friendly explanation for beginners, how does it work?
Newbie’s simple explanation: it just works, don’t worry about the smallest details.
I am also confused by "no fixed address in memory". Does this mean that every time we use a value const, the value on the stack is allocated only for this expression, and after the expression is executed, it will be destroyed?
Yes. May be. No.
, : . .
, , ... ?
:
? . , " " , .
, , const, , , , ?
. const , Drop. , . - , .