[Issue 4960] dmd 2.049 rejects code containing templates with a uint as template parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 30 10:32:19 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4960
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #2 from bearophile_hugs at eml.cc 2010-09-30 10:32:03 PDT ---
Also note the effect of this version of the same program:
template MeanField(int dim) {
class U {
cdouble opCall() {
return 0.0 + 0.0i;
}
}
}
void chargeChargeEntry(int dim)(MeanField!(dim).U time) {
pragma(msg, MeanField!(dim).U.mangleof);
}
void main() {
alias MeanField!(1).U TimeEvolver;
TimeEvolver timeEvolver = new TimeEvolver;
pragma(msg, TimeEvolver.mangleof);
chargeChargeEntry!(1)(timeEvolver);
}
Or even this version:
class U(int dim) {
cdouble opCall() {
return 0.0 + 0.0i;
}
}
void chargeChargeEntry(int dim)(U!dim time) {
pragma(msg, (U!dim).mangleof);
}
void main() {
alias U!1 TimeEvolver;
TimeEvolver timeEvolver = new TimeEvolver;
pragma(msg, TimeEvolver.mangleof);
chargeChargeEntry!(1)(timeEvolver);
}
See also bug 3467
--
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