Summary: Parameter storage classes are ignored in template
                    function deducing.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Kenji Hara <> 2011-06-24 09:00:09 PDT ---
In the following code, ref storage class of function foo's parameter s is
So calling foo with lvalue makes confusing.
int foo(S)(ref S s){ return 1; }
int foo(S)(S s){ return 2; }
void main()
    int n;
    assert(foo(n) == 1);  // Line 6
    assert(foo(0) == 2);
test.d(6): Error: template foo(S) matches more than one template
declaration, test.d(1):foo(S) and test.d(2):foo(S)

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

Reply via email to