How do I overload += operator?

Jack jckj33 at gmail.com
Mon Jan 25 21:53:15 UTC 2021


On Monday, 25 January 2021 at 17:11:41 UTC, Adam D. Ruppe wrote:
> On Monday, 25 January 2021 at 17:09:22 UTC, Jack wrote:
>>     auto ref opAssign(string op, T)(T value)
>
> try
>
> opOpAssign instead
>
> opAssign is for =
>
> opOpAssign is for +=, -=, etc.
>
> It might be some variation but I think it works if you just 
> rename it.

it did work, thanks. That naming is confusing


More information about the Digitalmars-d-learn mailing list