digitalmars.D.bugs - [Issue 2596] New: Variadic constructors don't compile
- d-bugmail puremagic.com (20/20) Jan 20 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
- d-bugmail puremagic.com (5/5) Jan 20 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
- d-bugmail puremagic.com (6/10) Jan 21 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
- d-bugmail puremagic.com (9/12) Jan 22 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
- d-bugmail puremagic.com (4/4) Mar 16 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
- d-bugmail puremagic.com (5/7) Mar 16 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
- d-bugmail puremagic.com (6/12) Mar 16 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
- d-bugmail puremagic.com (6/10) Mar 16 2009 I didn't say that he said that it was impossible ;) I asked "why can't ...
- d-bugmail puremagic.com (6/15) Mar 16 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
- d-bugmail puremagic.com (6/10) Mar 16 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
- d-bugmail puremagic.com (9/9) Apr 01 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2596
http://d.puremagic.com/issues/show_bug.cgi?id=2596 Summary: Variadic constructors don't compile Product: D Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: andrei metalanguage.com The following code doesn't compile: struct S { this(T...)(T args) { } } --
Jan 20 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596 S s = S(); What should be called - a default ctor or S.this() with empty tuple? --
Jan 20 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596S s = S(); What should be called - a default ctor or S.this() with empty tuple?Good question. Today that must be the default ctor because any struct must have a default constructor that doesn't execute user code. --
Jan 21 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596 smjg iname.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smjg iname.comS s = S(); What should be called - a default ctor or S.this() with empty tuple?The two would be one and the same. --
Jan 22 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596 It isn't variadic constructors, it's any constructor templates. --
Mar 16 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596It isn't variadic constructors, it's any constructor templates.Why? Ctors are not virtual; why can't they be templated? --
Mar 16 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596Walter didn't say it is impossible, he merely pointed out that the case is not a variadic constructor, but a /variadic template/ constructor, I believe. --It isn't variadic constructors, it's any constructor templates.Why? Ctors are not virtual; why can't they be templated?
Mar 16 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596Walter didn't say it is impossible, he merely pointed out that the case is not a variadic constructor, but a /variadic template/ constructor, I believe.I didn't say that he said that it was impossible ;) I asked "why can't ctors be templated" as in "why is it not possible now" instead of "why is it not possible". --
Mar 16 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596Well, ahem... It's a bug (or rather a missing functionality), that's why this report is here :) --Walter didn't say it is impossible, he merely pointed out that the case is not a variadic constructor, but a /variadic template/ constructor, I believe.I didn't say that he said that it was impossible ;) I asked "why can't ctors be templated" as in "why is it not possible now" instead of "why is it not possible".
Mar 16 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596Well, ahem... It's a bug (or rather a missing functionality), that's why this report is here :)Sure, and I'm just trying to provoke conversation about the issue with the language designer. --
Mar 16 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2596 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed DMD 2.027 --
Apr 01 2009