This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/13924] #include<vector> imports partial definition of std::abs
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2004 00:11:39 -0000
- Subject: [Bug libstdc++/13924] #include<vector> imports partial definition of std::abs
- References: <20040129204319.13924.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-01-30 00:11 -------
Subject: Re: #include<vector> imports partial definition of std::abs
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| I'm not sure whether we should just close this PR.
We should :-)
| I mean, assume
| that by #including <vector> we had, for some reason, only got one
| std::abs function. Then the argument would have been converted
| and the program had compiled. While this is clearly the correct
| behavior of the compiler, it is a QoI issue whether we would want
| that or not.
But, if you want to use std::abs(), you're going to include the
appropriate header anyway. I don't believe you can solve this kind of
problem in any satisfactory manner -- which is why there is that
explicit deviation from the C stanadard in the C++ standard. Keeping
this PR open is pointless.
See our set of slides on "What is the type of std::toupper?" at the
last ACCU03 conference for related issues.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13924