ilya-biryukov wrote: 🤯 amazingly, this only happens when the identifier being called is a lowercase version of the class name: https://gcc.godbolt.org/z/8aoaoPKnT:
```cpp template <class T> class Clone { public: Clone(const Clone<T>&); T* operator->() const; T* ptr_; }; template <class T> struct Foo { Foo(const Foo<T>&); T* operator->() const; T* ptr_; }; // Assume T* T::clone() template <class T> inline Clone<T>::Clone(const Clone<T>& t) { t->foo(); // ok t->clone(); // error t->bar(); // ok } // Assume T* T::clone() template <class T> inline Foo<T>::Foo(const Foo<T>& t) { t->foo(); // error t->clone(); // ok t->bar(); // ok } ``` I am looking forward to learning what is special about the matching names. https://github.com/llvm/llvm-project/pull/90152 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits