The problem also is that when you use 'auto' to simplify your code, DDoc doesn't process the associated documentation comment! Gee, I wonder if that's somewhere in bugzilla?
Ah, there:
http://d.puremagic.com/issues/show_bug.cgi?id=2581Else I'd use auto much more often. As it is, the only solution I found to avoid monstrous many-lines templated types is something suggested here: have the type produced by a wrapper template. It duplicates the work for the library writer, but it's easier on the eye for the user.
/**
Lazily returns all subranges of a range, beginning with an empty range.
*/
SubRanges!R subranges(R)(R range) {...}
Philippe