This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]