Re: Get operator overloads

2014-09-03 Thread Ivan Timokhin via Digitalmars-d-learn
02.09.2014 23:21, "Marc =?UTF-8?B?U2Now7x0eiI=?= " пишет: On Tuesday, 2 September 2014 at 18:55:50 UTC, Ivan Timokhin wrote: Is it possible to get all overloads of an operator for a particular type? I.e., having this struct definition, is it possible to tell at compile time that it can be added

Re: Get operator overloads

2014-09-02 Thread via Digitalmars-d-learn
On Tuesday, 2 September 2014 at 18:55:50 UTC, Ivan Timokhin wrote: Is it possible to get all overloads of an operator for a particular type? I.e., having this struct definition, is it possible to tell at compile time that it can be added with double and int[]? struct S { void opBinary(st

Get operator overloads

2014-09-02 Thread Ivan Timokhin via Digitalmars-d-learn
Is it possible to get all overloads of an operator for a particular type? I.e., having this struct definition, is it possible to tell at compile time that it can be added with double and int[]? struct S { void opBinary(string op : "+")(double); void opBinary(string op : "+")(int[]); }