Thanks, this make it clear.
(This also explains the existence of opBinaryRight)
On Wednesday, November 14, 2018 2:54:27 AM MST realhet via Digitalmars-d-
learn wrote:
> Hi,
>
> Just a little weird thing I noticed and don't know why it is:
>
> I have a FilePath struct and I wanted to make it work with the
> "~" operator and an additional string.
>
> So I've created a global
Hi,
Just a little weird thing I noticed and don't know why it is:
I have a FilePath struct and I wanted to make it work with the
"~" operator and an additional string.
So I've created a global funct:
FilePath opBinary(string op:"~")(FilePath p1, string p2){
return FilePath(p1, p2);