dyung wrote:

We are also seeing a build break internally which I bisected back to this 
change. In our case, I was able to reduce it to the following code:
```c++
#include <system_error>
template <typename a> class b {
  b operator=(b) { return operator=<>; }
  template <typename c, std::enable_if_t<std::is_convertible<c, a>::d>>
  void operator=(b);
};
```
After this change, this is now giving an error message:
```
repro:3:27: error: missing 'template' keyword prior to dependent template name 
'operator='
    3 |   b operator=(b) { return operator=<>; }
      |                           ^        ~~
1 error generated.
```
This code compiles successfully with gcc 13.2, and if I apply the 
`-fdelayed-template-parsing` it also compiles, but I just wanted to make sure 
this change was expected, and if so, how should the code be fixed to be correct?

Godbolt link: https://godbolt.org/z/57br1s47z

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

Reply via email to