Summary: Tuple cannot define with type that has only mutable
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Phobos

--- Comment #0 from SHOO <> 2012-09-18 07:01:43 PDT ---
On git head, this code doesn't work:
import std.typecons;

struct S
    bool opEquals(T)(T a) { return false; }

void main(string[] args)
    auto t = tuple(S.init);

import\std\typecons.d(432): Error: template main.S.opEquals does not match any
function template declaration
main.d(5): Error: template main.S.opEquals cannot deduce template function from
argument types !()(const(S))


This problem is probably caused by this commit:

This implementation forces opEquals() const on the type that it controls.
Add a further condition that is to define the method if needed to constraint-if
to avoid it.

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

Reply via email to