[Bug libstdc++/12961] Problem with generic complex constructor

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Mon Nov 10 09:45:00 GMT 2003


------- Additional Comments From gdr at integrable-solutions dot net  2003-11-10 09:45 -------
Subject: Re:  Problem with generic complex constructor

"Yves dot Renard at gmm dot insa-tlse dot fr" <gcc-bugzilla@gcc.gnu.org> writes:

| But I think, the problem is that the template definition should be
| complex(const _Tp& = _Tp(), const _Tp & = _Tp(0));

I can't understand that "should".  If your sscalar type behaves in
such a way that T() is different from T(0), then you're in trouble and
that isn't the library's fault.  See the standard requirement on
numeric types.

[...]

| The problem with QD is that the default constructor does not initialize the
| number to zero.

That is a flaw design in QD then.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12961



More information about the Gcc-bugs mailing list