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: 29 Jan 2004 23:08:34 -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-29 23:08 -------
Subject: Re: New: #include<vector> imports partial definition of std::abs
"reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| (Previous versions compiled the code without error. I don't know whether
| <vector> is allowed to include <cmath> as well, so I don't know whether
| this behaviour is okay or not.)
The testcase is an invalid program, and a diagnostic is given.
The C++ standard explicilty allows (unlike the C standard) any
standard header to include any other standard headers. So, this is
not a bug in V3.
Furthermore, the overloads of std::abs are spread (by C++ standard
definition) over many headers.
I suggest the PR be closed.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13924