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 c++/15910] can't compile self defined void distance(std::vector<T>, std::vector<T>)


------- Additional Comments From bangerth at dealii dot org  2004-06-10 14:45 -------
Jim is right -- the compiler looks into the namespace of the  
arguments when looking for a function 'distance' and therefore  
doesn't find the one in global namespace. It does find one  
in namespace std::, though, so tries to call it. In the  
process of this, it has to do some argument conversions, which  
fail -- this is what you get the error messages for.  
  
Jim already mentioned the correct way to write the program so  
that it compiles. Note that Intel's compiler also rejects this  
program.  
  
W.  

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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