Maybe this should work
```d
struct S
{
void opOpAssign(string op, T)(T t) { }
}
void main()
{
S a;
a ~= 0; // OK
auto b = &a;
b.opOpAssign!"~"(0); // OK
b ~= 0; // NG, but maybe should ?
}
```
The idea is that usually member functions are supposed to work on pointers to instances implementing these functions.
Comment #1 by dkorpel — 2024-05-27T14:37:01Z
Pointers already overload most operators (pointer arithmetic and slicing), so I don't think it's good practice to depend on overloading the remaining ones. Do you have a real type in use where you want to overload concatenation but keep pointer indexing?
Comment #2 by robert.schadek — 2024-12-13T19:35:25Z