[Bug libstdc++/13924] #include<vector> imports partial definition of std::abs

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Thu Jan 29 23:08:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list