[Bug libstdc++/19544] Difference in behaviour if default constructor added
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Fri Jan 21 02:25:00 GMT 2005
------- Additional Comments From gdr at integrable-solutions dot net 2005-01-21 02:25 -------
Subject: Re: Difference in behaviour if default constructor added
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| To be completely clear, the compiler generated default constructor is
| ptr() : a(0) {}
| not
| ptr() {}
| Thus, it _does_ initialize 'a'.
I don't follow you here.
If one writes
ptrwrapper() : ptr() { }
with the above syntax, ptr is *value initialized*, e.g. it is set to
zero. That is not to be confused with callig the default constructor
(which is trivial) for ptr.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19544
More information about the Gcc-bugs
mailing list