defining "in" What is the proper way in D2?
Charles Hixson
charleshixsn at earthlink.net
Sun Sep 11 14:09:57 PDT 2011
On 09/11/2011 01:33 PM, David Nadlinger wrote:
> On 9/11/11 10:25 PM, Vladimir Panteleev wrote:
>> void opBinary!("in")(Key k)
>
> Shouldn't that be »void opBinary(string op : "in")(Key k)«? Also, you
> probably want to use opBinaryRight, because opBinary hooks »if
> (container in key)«.
>
> David
And thanks for THIS, too. I'd just started to wonder about the order of
the syntax. After all, the key is in the container, but not conversely.
Charles
More information about the Digitalmars-d-learn
mailing list