Re: init of class members : mem(0) vs. mem() vs. not-init at all
On Jan 27, 6:49 am, Ulrich Eckhardt <dooms...@knuut.de> wrote:
news.aon.at wrote:
"Ian Collins" <ian-n...@hotmail.com> schrieb im Newsbeitrag
news:8qa2hbFke3U2@mid.individual.net...
On 01/26/11 08:51 PM, news.aon.at wrote:
what is the expected behaviour for
mem()
0
Has this changed since ARM ? (i tested 3 "older" compilers (before 2000)
and all 3 do not initialize mem with mem().
For the record, the first C++ standard was published in 99,
IIRC, so chances are that compilers didn't catch up within
a year.
The first C++ standard was officialized in 1998 (not 1999).
Most, if not all, compiler vendors were members of the
committee, however, and once the final committee draft was
adopted (about a year before officialization), they could start
work. As this is a simple change, and has no effect on existing
code, I would expect it to be implemented fairly quickly, and
implementation to start as soon as it was adopted by the
committee. (On the other hand, IIRC, it was adopted rather late
in the standardization process.)
Concerning whether that has changed, I don't know.
It's definitely a change between the ARM and C++98.
BTW, out of curiosity, what were those decade-old compilers
you tested and why?
Note that such older compilers will likely differ from the
standard in many ways: perhaps no support for exceptions or
RTTI, shaky and non-standards compliant support for templates,
etc.
--
James Kanze