D2: std.algorithm.find, but get part before what you were searching for

Philippe Sigaud philippe.sigaud at gmail.com
Thu Mar 4 05:39:04 PST 2010


On Thu, Mar 4, 2010 at 13:12, Steven Schveighoffer <schveiguy at yahoo.com>wrote:

> It is an issue with DDoc.  I think the signatures are not that nasty if you
> look at the actual code.  I think DDoc expands all aliases so you get the
> full template-expanded signature.
>
>
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=2581

Else 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20100304/3dd5a3e3/attachment-0001.htm>


More information about the Digitalmars-d-learn mailing list