how to call class' template constructor

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 13 02:14:35 PDT 2014


On Sun, 12 Oct 2014 21:30:44 -0400
Steven Schveighoffer via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> wrote:

> At least someone else has found a similar issue before: 
> https://issues.dlang.org/show_bug.cgi?id=10689
hm. i somehow missed this in my searches. thanks.

> I'm not sure what proper syntax would be, perhaps:
> auto a = (new A)!foo("xFn");
how about: `auto a = new A.this!foo("xFn");`?

there is no harm in specifying constructor name for resolving ambiguity
here. and it still allows `auto a = new A!int.this!foo("xFn");` for
example. and it's not breaking any existing code, afaik.

i'm sure that this is not a complex patch. let's hope someone will write
it and convince Walter to accept it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141013/d3c99e8b/attachment.sig>


More information about the Digitalmars-d-learn mailing list