<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/92188>92188</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang++-19: rejects-valid
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
egorpugin
</td>
</tr>
</table>
<pre>
https://godbolt.org/z/E5xqebhfK
```
struct A {
template <auto N>
void operator+=(this auto &&obj, const char (&c)[N]) {
}
void operator+=(this auto &&obj, auto &&c) {
}
};
int main() {
A a;
a += "123";
}
```
```
<source>:11:7: error: use of overloaded operator '+=' is ambiguous (with operand types 'A' and 'const char[4]')
11 | a += "123";
| ~ ^ ~~~~~
<source>:3:10: note: candidate function [with N = 4UL, obj:auto = A &]
3 | void operator+=(this auto &&obj, const char (&c)[N]) {
| ^
<source>:5:10: note: candidate function [with obj:auto = A &, c:auto = const char (&)[4]]
5 | void operator+=(this auto &&obj, auto &&c) {
| ^
1 error generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VM2OmzAQfprhMkoEYxwnBw6Qn0urvfUBDBjwiuDUNmm3h332yrCbZLdpq67UKIrt8djz_UwsndPtoFQGvAC-i-ToO2Mz1Rp7Gls9RKWpn7LO-5MDlgMdgA6tqUvT-6WxLdDhB9Bhz79_VWXXfIJ4B3H-8ruKX77T0nk7Vh5zBFHMEUREr46nXnqFwLZy9AYfgO2v22ejazQnZaU3FqgAtgNa-047nLKBVkArUz4CbbEyg_NYddIi0BpoVQFtgBcPwHdAm7eFQew-WOYmUv3-2jBhxa0eevB4lHqYsL07lqO8ZIe1xBkFAlFCDIiul10qvNX3fpBtnRltpYKqLE8SYLkAlqOy1tgwGZ1C06A5K9sbWaurDggkXrUQGKQ4lrodzeiCvN-07-bUoUb_dFIhKvKQGiJA4moH8CKdPBDBkJlkkiCILf6F7LR_SXxG4HvE5_C5y48FjnGgNRivwljJodZ1aLBmHCqvzYDAiwn8A4aa6ZfPwdTgLctna9kudCmtAuQLCnZB8f96cmYKfH-XHP8Xcnf5BDy30V_Azdgmr265849x_-Mf5erqvHglncytia0aQhVVL981dlRnrN6wjYxUloiEC0oF8ajLRBNLRauyrNlGqjgRopSNYlKsmWSVWEU6o5jSmCdp6LOYL5NGlLSWaVrzqlGMQRqro9T9su_Px_C8Rdq5UWUbStbrqJel6t3rQ2mzkLQox9ZBGvfaeXc95rXvVVb1cmiDSFQskk0wzKpHVXm3OMte19Fo-_cvq_bdWC4rcwQ6hNtehsXJmnAS6DAhckCHCdTPAAAA___HYpFC">