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


Author: Steve Clamage <stephen.clamage@sun.com>
Date: Wed, 9 Dec 2009 12:07:29 CST
Raw View
On Wed,  9 Dec 2009 00:51:39 CST, Scott Meyers
<NeverRead@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

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: Scott Meyers <NeverRead@aristeia.com>
Date: Wed, 9 Dec 2009 19:12:53 CST
Raw View
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

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: Kaz Kylheku <kkylheku@gmail.com>
Date: Wed, 9 Dec 2009 23:28:41 CST
Raw View
On 2009-12-09, Scott Meyers <NeverRead@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.

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: James Kanze <james.kanze@gmail.com>
Date: Thu, 10 Dec 2009 11:30:34 CST
Raw View
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


--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: Scott Meyers <NeverRead@aristeia.com>
Date: Wed, 9 Dec 2009 00:51:39 CST
Raw View
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-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: "Johannes Schaub (litb)" <schaub-johannes@web.de>
Date: Wed, 9 Dec 2009 12:06:51 CST
Raw View
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

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]