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

            Bug ID: 52454
           Summary: ADL broken with clang 13.0.0
           Product: clang
           Version: 13.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: dodoentertainm...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

Here is the Godbolt link that reproduces the issue that I've stumbled upon in
my codebase: https://godbolt.org/z/ocMdcxj89

Namely, the code uses ADL to inject a custom implementation of swap for the
boost iterator_facade (the swap is needed for `std::sort` to work).

This works great on GCC and MSVC and worked also on clang until v13.0.0 when it
stopped working.

You can see the error in the above Godbolt link.

Interestingly, if I replace `std::sort` with `boost::sort::pdqsort`, the same
implementation of swap can now be found using ADL.

You can see this in this example: https://godbolt.org/z/r8eMbY5r4

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to