S
Steven T. Hatton
Steven said:That's kind of what I expected.
I have an easier was to determine that a function isn't an object. It is
explicitly stated in 1.8 of the Standard.
I have yet to really examine references, but that was more or less what I
expected. Does this mean references aren't really runtime 'things'? IOW,
are they bound to something else at compile time? I believe what I'm
asking is whether references are always static.
I know my level of understanding of references is below that which I can
gain from carefully reading the FAQ, so I'll do my homework before
pursuing it further.
This is a somewhat telling passage from 3.5:
"A name is said to have linkage when it might denote the same object,
*reference*, function, type, template, namespace or value as a name
introduced by a declaration in another scope:..." (*emphasis* mine)
So we can probably assume the namable 'things' in the list other than
object
are not objects. Note that this includes references.
OTOH: "The storage duration categories apply to references as well. The
lifetime of a reference is its storage duration." - 3.7 of PL-C++03 (The
Standard)
And also TC++PL(SE) pg 98:
"[A] reference isn't an *object* that can be manipulated the way a pointer
is:
PP: [&ii]\
\
\
rr:---> ii:
In some cases, the compiler can optimize away a reference so that there is
no *object* representing that reference at run-time." (emphasis mine)
This is starting to sound more and more like wave particle duality. :-/