On 07/01/2011 02:43, Paul wrote:
On 07/01/2011 02:03, Paul wrote:
On 06/01/2011 23:50, Paul wrote:
On 06/01/2011 21:56, Ulrich Eckhardt wrote:
Paul Reid wrote:
So just because the standard doesn't add an explicit exclusion,
anything else can be part of an object? Like Your Momma, for
example?
Exactly,
I warmheartedly welcome Your Momma as a subobject.
the standard does not explicitly state that member functions
are not members of an object.
That is not how you should read this. In any case, it would
require
adding
the term "..and nothing else" in hundreds of places. Look up e.g.
the
definition of natural numbers. Does it explicitly exclude the
others or
does it just specify those contained? You're obviously unused to
scientific and technical language, so this might be weird to you,
but it
is common and everybody understands it as such, once they are
used to
it.
The standard states a subobject can be zero size, this is not
coherent
with the statement that an object is a region of storage.
Right, this seems inconsistent. Read up on the exception when a
subobject
can occupy no additional storage. You need to understand the
whole
image
first, then you can start arguing.
Also referneces are made to subobjects and MEMBER subobjects, so
these
are obviously 2 different concepts according to the standards.
I didn't make these references. In any case, the definition of a
subobject
was already quoted elsewhere, in short it can be a member,
baseclass or
array element. It is an object though, not a function.
These member subobjects are defined in section 9.2:
"1 The member-specification in a class definition declares the
full set
of members of the class;[...]"
Class members are not object members (member subobjects).
The standards clearly state a member function as a member of a
class so
it follows the member function is exclusively associated with
that
object type, as the class is a definition of the object type.
If the definition of the object type defines a member function
then the
member function is part of the object because it was defined
to be.
No that doesn't follow and the C++ standard explicitly says so,
once you
accept the lingo, that is.
The function code is the same for all instances of that object
type so
it makes no sense, and would be very inneficient, to store a
seperate
version of the function inside each objects storage region.
So the function is not contained inside the object's storage
region.
Since
the object is defined as storage region, the function is not
contained
inside the object. You can waffle all you want, switching between
C++
standardese and colloquial use of terms, you are not documenting
inconsistencies in the C++ standard or other peoples'
understanding
thereof but only your own lack of understanding.
Interestingly the C++0x draft standard states the following:
28.13/2
"Objects of type specialization of basic_regex store within
themselves
a default-constructed instance of
their traits template parameter, henceforth referred to as
traits_inst. This traits_inst object is used
to support localization of the regular expression; basic_regex
*object
member functions* shall not call any
locale dependent C or C++ API, including the formatted string
input
functions. Instead they shall call the
appropriate traits member function to achieve the required
effect."
It should probably say "basic_regex *member functions*" instead.
Relaxing the definition of what the term "object" means within the
draft document is a minor error but one that the troll Paul will
probably now pounce on, unfortunately.
Oh the lulz of it all; new year bollocks; I blame Holiday
alcoholic
brain damage.
/Leigh
Obviously this guy doesn't have the brain capacity to understand
the
difference between the terms
"object" and "object member function".
The term "object member function" does not exist in the C++
standard;
as I pointed out it did exist in the draft C++0x standard (although
one can argue it is a compound term) but this was an error which has
now been fixed by Pete. The default terminology of this newsgroup
should be the terminology defined by the C++ standard if available
otherwise you need to define your terms. In C++ member functions are
part of classes not objects.
The C++ standards do not define programming terms as they are used in
this or any other forum or newsgroup.
That fact that you seem to think so makes you appear very narrow
minded.
Also "object type" does not mean the same thing as "object"; an
object
is an *instance of* an object type; an object type does not have
to be
a class.
int object;
How can this be an object when your definiton of an object is an
*instance of* an object type
You don't make sense and you seem completely confused about objects.
*I* am confused??? Are you completely thick?
Yes you are confused and no I'm not thick but you obviously are, you
said :
"an object is an *instance of* an object type; an object type does not
have to be a class."
You imply that an object can be a class, yet you also state that an
object is an instance of an object type, and you also give an example
of
an integer as an object.
You don't seem to know what an object is. Maybe it's whatever you want
it to be.
I did not imply that an *object* can be a class at all (an *object
type* can be a class); I said that an *object type* does not have to
be a class (I gave an example of int). You don't seem to be able to
understand simple logic represented by the English language. "OBJECT
TYPE" IS NOT THE SAME AS "OBJECT"; AN "OBJECT" IS A "REGION OF
STORAGE" NOT A TYPE.
/Leigh