http://d.puremagic.com/issues/show_bug.cgi?id=8395
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 AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don <clugd...@yahoo.com.au> 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 declaration 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------