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]

Re: c++/8990: most algorithms in <algorithm> should require being qualified by std:: but aren't


Synopsis: most algorithms in <algorithm> should require being qualified by std:: but aren't

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Wed Dec 18 08:30:07 2002
State-Changed-Why:
    What you are missing is that Koenig lookup makes sure that
    the compiler looks up the function name also in the namespace
    of the arguments given to the function. Since they are
    iterators in your case, their data type is declared in
    std::, so the compiler looks into std:: for the name of
    the function and, lo and behold, finds what you want.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8990


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