[llvm-bugs] [Bug 47967] Template function gets selected also if a non-template function with appropriate signature exists

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 26 10:00:45 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47967

Richard Smith <richard-llvm at metafoo.co.uk> changed:

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

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Looks like GCC has a bug here. Overloaded operators in a template are found by
unqualified lookup at the point of definition (which finds only the template)
plus ADL (which only looks in namespaces associated with the argument types, in
this case only namespace 'data'), so the non-template operator is not
considered in this example.

See http://clang.llvm.org/compatibility.html#dep_lookup for more information.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201026/4ce3bb81/attachment-0001.html>


More information about the llvm-bugs mailing list