[llvm] Inline operator== and operator!= (PR #67958)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 23:09:49 PDT 2023


kuhar wrote:

So it would seem we would have to make the `operator==` friend of both the vector and the iterator class? Something like:
```c++
template <...>
class PagedVector {
  ...

  class MaterializedIterator;
  friend bool operator==(const MaterializeIterator& lhs, const MaterializedIterator& rhs);

  class MaterializedIterator {
    friend bool operator==(const MaterializeIterator& lhs, const MaterializedIterator& rhs) {
      ...
    }
  };
};

https://github.com/llvm/llvm-project/pull/67958


More information about the llvm-commits mailing list