Ok. On first reading, I didn't catch that a compiler issuing an error
for undefined unused functions would not be standard compliant.
I'm not having any problems.
Does the standard not also define member subobjects as it is written in
italics.
I think you will find it is section 9.2 , where member function is clearly
referred to as SUrprisingly enough a Memberrrrrrrr.
The exact title of 9.2 is "Class Members".
In fact, you could think of member functions as free functions with a
hidden parameter (this that inherit cv qualifiers of function) and
special access rights.
No it's not JUST a primative region of memory. THe standards themselves
stAte that an object can contain member subobjects
And ?
It is just a matter of memory layout, duration and order of
initialisation/destruction.
Typically, int he next standard, you will have standard-layout class
what are basically POD with member functions.
The problem is you misinterpret the standards as you have clearly done in
this post by stating:
" So, in C++ an object is a very primitive thing; just a region of
memory."
This is commpletely different from what the standards state. In fact it is
almost the oppisite meaning.
I will dutifuly quote the standard just has many have done.
"1.8 The C++ object model
The constructs in a C++ program create destroy, refer to, access, and
manipulate objects. And "object" is a region of storage. [Note: A
function is not an object, regardless of whether it occupies storage
in the way that objects do]. [...]
An object can have a name[...]has a storage duration[...]has a type.
[...]"
A function is not an object and as such cannot be a subobject.
In the last part, it is not said that an object can have a function
(only name,duration,type).
If you think I'm incorrect please point out where.
I don't see how I can be incorrect when I am simply going with what is
stated in the standards.
I must have missed the relevant post in which you quote the standard
supporting your point.
--
Michael
....................................................................................................................................................
Well once again we seem to have a newsreader that doesn't like to indent
your txt.
However this will not stop me form replying to your post.
You have dutifu quoted form the standads a part of the following re:
<quote>
1 The constructs in a C++ program create, destroy, refer to, access, and
manipulate objects. An object is a
region of storage. [ Note: A function is not an object, regardless of
whether or not it occupies storage in the
way that objects do. -end note ] An object is created by a definition (3.1),
by a new-expression (5.3.4) or
by the implementation (12.2) when needed. The properties of an object are
determined when the object is
created. An object can have a name (Clause 3). An object has a storage
duration (3.7) which influences
its lifetime (3.8). An object has a type (3.9). The term object type refers
to the type with which the object
is created. Some objects are polymorphic (10.3); the implementation
generates information associated with
each such object that makes it possible to determine that object's type
during program execution. For other
objects, the interpretation of the values found therein is determined by the
type of the expressions (Clause 5)
used to access them
</quote>
Please note that you have only quoted a small part of the standards and that
your interpretation of the standards is very incorrect.
If you were to read the next paragraph of the standards re~:
<quote>
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
</quote>
Now we see what the standards clearly states.
Please would you refrain form misinterpeting the C++ standards in this
newsgroup or any other newsgroup I chose to view as your misinterpretations
can be very confusing for someone less knowledgeable than myself. You have
chosen a small snippet of text from the standards and you have tried to
interpret it in such a way to mean something other than its intended
meaning. This suggests to me that you
a) do not understand the standards and the C++ programming language.
b) chose to misinterpret the standards to support an argument in which you
are fundamentally wrong.