Matthias Walter <> changed:

           What    |Removed                     |Added
                 CC|                            |
         OS/Version|Windows                     |All

--- Comment #1 from Matthias Walter <> 2010-11-28 
08:27:14 PST ---
More precisely, the issue is that in the following code, the opEquals method is
not called for the array comparison. As it seems, the only opEquals signature
working for array comparison is "bool opEquals (ref const BigInt y) const",
making it impossible to have more versions to compare to different types.

struct BigInt
    bool opEquals (Tdummy = void)(ref const BigInt y) const
      writefln("BigInt.opEquals!void(BigInt) called");
      return true;

    bool opEquals (T: long) (long y) const
      writefln("BigInt.opEquals!long called");
      return true;

void main()
  BigInt i,j;

  writefln("i == j: %s", i == j);
  writefln("[i] == [j]: %s", [i] == [j]);

The output is:

BigInt.opEquals!void(BigInt) called
i == j: true
[i] == [j]: true

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to