Summary: Templated struct constructors don't implicitly convert
                    to const
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Don <> 2012-07-16 23:45:37 PDT ---
struct S
  int m;
//  this(long x)   
//  this(T : long)( T x) const
  this(T : long)( T x)
  { m = x;}
void main()
    S s = 6;
   const S t = 7;

bug.d(18): Error: template bug.S.__ctor does not match any function template
bug.d(11): Error: template bug.S.__ctor(T : long) cannot deduce template
function from argument types !()(int)

If the constructor signature is replaced with either of the two commented
lines, it compiles.

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

Reply via email to