lovecreatesbeauty wrote:
Prof. Bjarne Stroustrup said "built-in data types have default
constructor" at §10.4.2 in `TC++PL, special ed.'.
Yes, _syntactically_ and _semantically_, not *literally*.
He also said that "built-in data types are not classes" at §11.4 in
`TC++PL, special ed.'.
Yes.
(Sorry, I'm reading a Chinese edition of the book, and can't get a
English edition handy currently. Perhaps these words are not same as
his book, but I think the meaning is the same.)
Pretty much. I don't have my copy of the SE handy either, but I am
certain that you quote it correctly.
Can I take Built-in Data Types as Compiler Defined Types. Then it's
the same as class (UDT) at this point.
What do you mean by "can I take"? The important difference is that
the built-in types (a) have some conversions defined that are implicit
and (b) have predefined operators that cannot be redefined and (c)
have no member functions. The similarity is only in two areas: the
built-in types can be "constructed" using syntax "type()", and there
is a "pseudo-destrutor call" defined for them, like "~int()". Those
things were added to them so that they can be used with templates,
IIUIC.
V