https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
Patrick Palka changed:
What|Removed |Added
Resolution|--- |FIXED
Target Milestone|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
--- Comment #8 from CVS Commits ---
The master branch has been updated by Patrick Palka :
https://gcc.gnu.org/g:bb2a7f80a98de3febefbb32b1e4898062bdb6af8
commit r12-6022-gbb2a7f80a98de3febefbb32b1e4898062bdb6af8
Author: Patrick Palka
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
--- Comment #7 from Patrick Palka ---
(In reply to Jonathan Wakely from comment #6)
> (In reply to Jonathan Wakely from comment #2)
> > Maybe another case of PR 51577 but I haven't looked into it yet.
>
> The testcase in comment 4 was fixed by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
Jonathan Wakely changed:
What|Removed |Added
Last reconfirmed|2021-05-07 00:00:00 |2021-11-25
--- Comment #6 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
--- Comment #5 from Jonathan Wakely ---
As a workaround the library could use __str.append or __str.operator+=
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
--- Comment #4 from Jonathan Wakely ---
Reduced:
namespace N
{
template
struct string_view
{
using char_type = C;
};
template
struct string
{
void operator+=(const string&);
template
void operator+=(const T&);
};
template
void f()
{
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
Jonathan Wakely changed:
What|Removed |Added
Last reconfirmed||2021-05-07
Ever confirmed|0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
--- Comment #2 from Jonathan Wakely ---
Maybe another case of PR 51577 but I haven't looked into it yet.
I will say that a templated operator in the global namespace with absolutely no
constraints to limit what it accepts is a very bad idea.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100465
--- Comment #1 from Ramchandra Apte ---
(In reply to Ramchandra Apte from comment #0)
> Created attachment 50771 [details]
> Minimal example
>
> Adding an templated function overload for operator+= and including
> causes a compilation error