A
AndyRB
Bjorn said:...
This was one of the things that amused me when I programmed in C/C++ many,
many years ago, that a "long" not necessarily needed to be "longer" than an
"int"... ;-)
I'm not sure that you by "implementation defined" actually mean anything
else than Roedy does with the phrase "platform-dependent". The term
"platform" can unfortunately mean several things, not only OSs and such,
depending on the context it's used in.
An implementation in c++ is defined as any conforming implementation of
c++ provided by a c++ compiler.
I interpreted the phrase platform-dependent to basically mean Hardware
and OS.
AFAIR I could even use different definitions for the primitives within *the
same environment*, depending on the switches I set for the compiler...
Which I had to do in some cases to get the same results of the code when I
moved it between different compilers.
So you could easily say that the primitives in C++ are dependant on even
*more* things than just the "platform"...
Certainly two conforming compilers targeting the same platform could
specify different sizes for primitive types, as long as they meet the
minimum size guarantees.