When making something const
in C++ what makes it that you cannot for example implicitly pass it a non-const at the lower levels of the machine? How is it determined by the machine that this is const
?
(besides the fact that const
means what it means...)
Is it perhaps stored in the .rdata section of memory or is there a bit that gets set that makes it const or how does that work?
Can anyone clarify?