Francis Glassborow said:
And where did I say that it did? All I said is that the subobjects (both
member and base) must occupy storage that is part of the contiguous
storage that makes up the complete object.
It is incorrect to suggest that all subobjects MUST occupy storage, whether
it be contiguous within the objects region of storage or not.
A subobject can be zero in size and not occupy any storage re:
"6 Unless an object is a bit-field or a base class subobject of zero size,
the address of that object is the address
of the first byte it occupies. Two distinct objects that are neither
bit-fields nor base class subobjects of zero
size shall have distinct addresses.4"
Once again I have corrected you on a simple technicality, as always you will
refuse to accept this.
To suggest anything else is to fail to understand the requirements laid
down by the C++ Standard.
huh?
Its you that seems to be misunderstanding the C++ standards.
No an objects type is defined by its declaration. Actually we allow
something that C calls an effective type which is the type the storage is
being used for.
Again you disagree with the standards I quote section 9.2 paragraph 2:
"2 A class is considered a completely-defined object type (3.9) (or complete
type) at the closing } of the
class-specifier."
It's just ridiculously inconceivable that you should be arguing with these
very basic thing, you seem to be trying to argue just for the sake of
arguing.
For example we can take a raw block of storage (normally handled vis a
void pointer) and construct an instance of a class in that storage. At the
completion of the constructor the raw storage takes on the behaviour
provided by the class functions and friend functions.
dunno what your going on about here?
If an object contains 99 pointers those pointers are 99 subobjects. The
storage they point to is not the subobject. You may be unhappy with that
but that is the way that it is in C++. Memory acquired either dynamically
or provided externally (as when a pointer represents ownership) is NOT
part of the object.
I didnt say the memory location was a subobject but thats what you're trying
to say.
It is you who is associating subobjects with memory locations, not me.
No, a member subobject is one of two types of subobject that C++
recognises; the other is a base subobject. The C++ Standard tells me what
a complete object is in C++. In other contexts a subobject might mean
something quite different but in C++ it is exactly what the Standard says
it is.
A member subobject is defined in the C++ standard. Section 9.2
<quote>
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. Except when used to declare friends (11.4) or to
introduce the name of a member of a
base class into a derived class (7.3.3, 11.3), member-declarations declare
members of the class, and each such
member-declaration shall declare at least one member name of the class. A
member shall not be declared
twice in the member-specification, except that a nested class or member
class template can be declared and
then later defined, and except that an enumeration can be introduced with an
opaque-enum-declaration and
later redeclared with an enum-specifier.
</quote>
Note that the C++ standards clearly lists member function here surprisingly
enough as a member of the class.
..
Now we could have an interesting discussion about what a reference member
is. Here I suspect that the C++ Standard may be confused. However until
you can discuss things without throwing insults around I have no intention
of discussing it with you. In addition this is the wrong place for such a
discussion (comp.std.c++ would seem the appropriate place). If anyone
likes to raise the issue in csc++ I would be happy to explore the issue
there.
Suddenly you decide I'm not worthy again LOL
I have proven that you are technically incorrect and if you chose to slither
off an hide thats your prob not mine.