Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #145

Re: Compound types as functions in latest C++ standard

From Edward Diener <eldiener@tropicsoft.invalid>
Newsgroups comp.std.c++
Subject Re: Compound types as functions in latest C++ standard
Date 2011-05-03 19:32 -0600
Organization A noiseless patient Spider
Message-ID <ipnn44$efa$1@dont-email.me> (permalink)
References <ipk3tb$6jd$1@dont-email.me> <IIWdnRXkAuzmgyPQnZ2dnUVZ8oGdnZ2d@bt.com>

Show all headers | View raw


On 5/2/2011 3:10 PM, Francis Glassborow wrote:

>
> On 01/05/2011 19:52, Edward Diener wrote:
>
>>
>> In the latest C++ standard document (n3290) in section 3.9.2 part 1,
>> where it mentions the ways in which compound types can be constructed
>> I read:
>>
>> "=97 functions, which have parameters of given types and return void or
>> references or objects of a given type, 8.3.5;"
>>
>> Should not this say "... return void or references or pointers or
>> objects of a given type, 8.3.5;", or better yet just say "... return
>> void or given types, 8.3.5;".
>>
>>
>> Strictly speaking a pointer is an object. References are not objects. A
> function does not and cannot return a type. So the wording is correct as
> it stands.
>

I did not realize that "a pointer is an object" in C++ standards
terminology. In that case the original wording is perfectly correct.

I do think it is natural to have assumed that "an object" meant something
different. One often refers to "pointers to objects" or "references to
objects" to distinguish objects themselves from the pointer or reference wa=
y
of specifying an object.


--
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

Back to comp.std.c++ | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Compound types as functions in latest C++ standard Edward Diener <eldiener@tropicsoft.invalid> - 2011-05-01 12:52 -0600
  Re: Compound types as functions in latest C++ standard Francis Glassborow<francis.glassborow@btinternet.com> - 2011-05-02 13:10 -0600
    Re: Compound types as functions in latest C++ standard Edward Diener <eldiener@tropicsoft.invalid> - 2011-05-03 19:32 -0600
      Re: Compound types as functions in latest C++ standard  Pete Becker <pete@versatilecoding.com> - 2011-05-04 12:46 -0600
  Re: Compound types as functions in latest C++ standard Daniel Krügler<daniel.kruegler@googlemail.com> - 2011-05-02 13:10 -0600
  Re: Compound types as functions in latest C++ standard Johannes Schaub<schaub.johannes@googlemail.com> - 2011-05-02 13:11 -0600
    Re: Compound types as functions in latest C++ standard Francis Glassborow <francis.glassborow@btinternet.com> - 2011-05-02 16:59 -0600

csiph-web