Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Missing definitions for "local" and "non-local" objects?

1 view
Skip to first unread message

Scott Meyers

unread,
Dec 9, 2009, 1:51:39 AM12/9/09
to
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

--
[ 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 ]

Johannes Schaub (litb)

unread,
Dec 9, 2009, 1:06:51 PM12/9/09
to
Scott Meyers wrote:

> 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

Steve Clamage

unread,
Dec 9, 2009, 1:07:29 PM12/9/09
to
On Wed, 9 Dec 2009 00:51:39 CST, Scott Meyers
<Neve...@aristeia.com> wrote:

>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

Scott Meyers

unread,
Dec 9, 2009, 8:12:53 PM12/9/09
to
Steve Clamage wrote:
>
> 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).

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

Kaz Kylheku

unread,
Dec 10, 2009, 12:28:41 AM12/10/09
to
On 2009-12-09, Scott Meyers <Neve...@aristeia.com> wrote:
> 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?

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.

James Kanze

unread,
Dec 10, 2009, 12:30:34 PM12/10/09
to
On Dec 9, 6:51 am, Scott Meyers <NeverR...@aristeia.com> wrote:
> 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?

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

0 new messages