Signed-unsigned comparisons in Phobos

Ellery Newcomer ellery-newcomer at utulsa.edu
Fri Aug 12 15:37:16 PDT 2011


On 08/12/2011 04:06 PM, Don wrote:
>
> No, it was specifically disallowed.
>
> Version D 2.037 Dec 3, 2009
> New/Changed Features
> No more comma operators allowed between [ ].

I think that was for type declarations, not index expressions.

you can still do this:

import std.stdio;
struct X{
     void opIndex(int i, int j){
         writeln(i, " ", j);
     }
}
void main()
{
      X x;
      x[1,2];
}


More information about the Digitalmars-d mailing list