[Issue 5073] wrong file name in error message for "voids have no value" inside alias templates (affects std.algorithm.map)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 19 17:40:42 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5073
--- Comment #5 from Rob Jacques <sandford at jhu.edu> 2011-05-19 17:36:31 PDT ---
*oops* forgot the else statements
template map(fun...) {
auto map(Range)(Range r) {
static if (fun.length > 1) {
return Map!(unaryFun!(adjoin!(staticMap!(unaryFun,fun))),Range)(r);
} else {
static if( is(typeof(fun[0]) == delegate) ) {
return Map!(fun, Range)(fun[0],r);
} else static if( is(typeof(unaryFun!fun) == delegate) ) {
return Map!(unaryFun!fun, Range)(unaryFun!fun,r);
} else static if( is(Range E:E[]) ) {
return Map!(unaryFun!fun, E[])(r[]);
} else {
return Map!(unaryFun!fun, Range)(r);
}
}
}
}
--
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