"Bo Persson" <> wrote in message
news:...
> Paul wrote:
>>
>> An object type is defined by its class and can be defined to
>> contain member functions.
>> A member function is specifically connected to the object on which
>> it was called.
>>
>> The C++ standards state that an object is a region of memory but
>> they do not state that it is JUST a region of memory. The C++
>> standards then go on to state that objects can contain member
>> subobjects, these are defined within the class. The fact that the
>> standard goes on to describe or define objects in greater detail is
>> evidence that the C++ obviously do not imply an object is JUST a
>> region of storage.
>
> The standard actually says exactly that:
>
> "An *object* is a region of storage." (§1.
>
> The fact that the word "object" is in italics means that this is the
> definition of the term "object".
>
> The standard then goes on to say "Note: A function is not an object,
> regardless of whether or not it occupies storage in the way that objects
> do."
>
>
> Had the committee decided that member functions should be objects, even
> though other functions are not, they would certainly have stated that.
wHY ARE YOU EVEN CONSIDERING THE FACT THAT A FUNCTION MIGHT BE AN OBJECT ,
THIS IS CRAZY.
A function is not an object, caps not inteded but not rewriting it .
>And if they are not objects, they cannot be sub-objects of other objects,
>because a sub-object is also required to be an object:
>
Since when was a subobject required to be an object? You state that its
REQUIRED as if the standards state this.
>Objects can contain other objects, called *subobjects*."
>
> Here again, the word "subobject" in italics means that this is the
> definition of the term.
>
>
> Bo Persson
>
>
>tHE STANDARD SEEMS to define a member subobject in section 9.2, ref section
>1. para 2:
"Objects can contain other objects, called subobjects. A subobject can be a
member subobject (9.2), a base
class subobject (Clause 10), or an array element. An object that is not a
subobject of any other object is
called a complete object."
If you goto section 9.2 :
"9.2 Class members [class.mem]
member-specification:
member-declaration member-specificationopt
access-specifier : member-specificationopt
member-declaration:
attribute-specifieropt decl-specifier-seqopt
member-declarator-listopt ;
function-definition ;opt
:

pt nested-name-specifier templateopt unqualified-id ;
using-declaration
static_assert-declaration
template-declaration
alias-declaration
member-declarator-list:
member-declarator
member-declarator-list , member-declarator
member-declarator:
declarator pure-specifieropt
declarator brace-or-equal-initializeropt
identifieropt attribute-specifieropt : constant-expression
pure-specifier:
= 0
1 The member-specification in a class definition declares the full set of
members of the class; no member
can be added elsewhere. Members of a class are data members, member
functions (9.3), nested types,
and enumerators. Data members and member functions are static or non-static;
see 9.4. Nested types are
classes (9.1, 9.7) and enumerations (7.2) defined in the class, and
arbitrary types declared as members by use
of a typedef declaration (7.1.3). The enumerators of an unscoped enumeration
(7.2) defined in the class are
members of the class."
This is how the standard defines the term member subobject.