[Issue 4285] template inside function error message
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 27 04:50:00 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4285
--- Comment #5 from bearophile_hugs at eml.cc 2012-10-27 04:49:59 PDT ---
Templated functions are allowed inside functions:
void main() {
T foo(T)(T x) {
return x * x;
}
assert(foo(10) == 100);
assert(foo(10L) == 100L);
}
So why are templates not accepted inside functions? It's a handy "all the
turtles down" as Walter says.
--
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