rupprecht wrote:

This commit appears to regress an example like this:

```c++
template <typename T>
struct Foo {
  template <typename X>
  int bar(X x) {
    return 0;
  }

  template <>
  int bar(int x) {
    return bar(5.0);
  }
};

void call() {
  Foo<double> f;
  f.bar(1);
}
```

Used to compile, now results in an error:
```
PR87541.cpp:10:12: error: call to non-static member function without an object 
argument
   10 |     return bar(5.0);
      |            ^~~
PR87541.cpp:16:5: note: in instantiation of function template specialization 
'Foo<double>::bar<int>' requested here
   16 |   f.bar(1);
      |     ^
```

Is that intended?

https://github.com/llvm/llvm-project/pull/87541
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to