[libcxx-commits] [PATCH] D128864: [libc++] Fix algorithms which use	reverse_iterator
    Nikolas Klauser via Phabricator via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Thu Jul 21 02:48:11 PDT 2022
    
    
  
philnik added inline comments.
================
Comment at: libcxx/include/__iterator/reverse_iterator.h:429
+  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const _AlgRevIter& __lhs, const _AlgRevIter& __rhs) {
+    return __lhs.base() == __rhs.base();
+  }
----------------
var-const wrote:
> philnik wrote:
> > var-const wrote:
> > > Hmm, so this expression is not ambiguous, but when it's used as a constraint in a `requires` clause, it is considered ambiguous? Am I missing something?
> > No, that's exactly the case.
> Interesting. Why is that?
I don't know exactly why, but I think it is because that would change the overload resolution. With the change in SFINAE contexts you could end up calling different functions, not just allow code that would otherwise be an error.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128864/new/
https://reviews.llvm.org/D128864
    
    
More information about the libcxx-commits
mailing list