Thanks,
Scott
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std...@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
> Is it just my inability to search both C++03 as well as draft C++0x, or do
> both documents make extensive references to "local" and "non-local"
> objects without ever defining either term?
>
I don't know where the definition is.
The issue has been raised at least two times, but seems to have been
stalled: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#365 .
In that defect report, the committee said "It might be desirable to shorten
the storage duration of temporaries to allow reuse of them.", but as far as
i can see, if a temporary has static storage duration, we are allowed to do
nasty things implementations can't cope with:
http://groups.google.com/group/comp.std.c++/browse_thread/thread/826213123a24f9fd
>Is it just my inability to search both C++03 as well as draft C++0x, or do both
>documents make extensive references to "local" and "non-local" objects without
>ever defining either term?
>
>Thanks,
>
>Scott
In the 2003 standard, look in the index under "local". You will see
references to the definition of local scope, local classes, local
objects, and (destruction of) auto variables (which are local, by
definition). The index of the current draft (docment n3000) does not
seem to be as detailed.
---
Steve Clamage
I certainly will. But I remain unable to find the definitions I am
looking for. If they are in C++03 or draft C++0x, I would appreciate
a specific pointer to where I can find them.
Thanks,
Scott
The C standard is the same way. Maybe this is in one of the normative references.
I've recently noticed that C99 uses the term ``local variable'' without defining
either local, or variable or the combination.
Funny how people catch similar things at around the same time.
The standard defines local scope and local names in �3.3.2 (in
C++03). Local objects is probably an elipsis for "object whose
name has local scope", but it's not clear. ("Local" refers to
scope, and objects don't have scope; only names have scope.)
--
James Kanze