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

bangerth@dealii.org bangerth@dealii.org
Wed Dec 18 08:30:00 GMT 2002


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



More information about the Gcc-prs mailing list