[Issue 8441] mixin containing template functions causes compiler errors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 18 09:17:12 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=8441



--- Comment #5 from jfanatiker at gmx.at 2013-01-18 09:17:10 PST ---
> In the context of template mixins with mixinIdentifiers only. Template
> overloads, as a general rule, do work.

Yeah, I meant that. I used to think that template functions in a mixin
template don't work, but it is just overloads. Thanks for pointing this
out.

> > Unfortunately it does not really help for std.signals2, because
> renaming the
> > methods to connectDirectly, connectViaDelegate, .... seems rather
> ugly,
> > although I don't think it is a good idea to alter a public API
> because of
> > workarounds. I would be fine, if it only affected private parts.
> 
> Technically, I didn't rename anything. I merelly added some extra
> functions to
> remove the ambiguity in the context of the mixin identifier.
> 
> Yes, it is ugly, but the public interface is intact.

But the instantiation of a signal and the access:
mixin T!("1") t0;
alias t0 t1;
x.f1().j!(3,"a")(2.2, 3.3);

vs
mixin T!() t0;
x.t0.j!(3,"a")(2.2, 3.3);

would change, which is part of the public accessible API. If the
workaround gets removed, people would have to adopt their code, which is
kind of unacceptable for phobos.

Best regards,

Robert

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list