We need better documentation for functions with ranges and templates
Meta via Digitalmars-d
digitalmars-d at puremagic.com
Mon Dec 14 13:02:10 PST 2015
On Monday, 14 December 2015 at 20:53:53 UTC, Andrei Alexandrescu
wrote:
> One thing we definitely need to do is make the template
> constraints rendered better in documentation, and also allow
> user content in them. We've discussed this several times but no
> clear path emerged so far. Maybe a strong champion would come
> forward?
>
> I'm thinking along the lines of:
>
> * Change ddoc to output the constraint separately under a
> DDOC_CONSTRAINT macro.
>
> * Allow ddoc comments inside macros:
>
> bool isSameLength(Range1, Range2)(Range1 r1, Range2 r2)
> if (isInputRange!Range1 && isInputRange!Range2 &&
> !isInfinite!Range1 && !isInfinite!Range2
> /**
> `Range1` and `Range2` must be both non-infinite input ranges.
> */
> );
>
> then format that comment as a DDOC_CONSTRAINT_USERTEXT or
> something.
>
> These would be good steps to take.
>
>
> Andrei
I'm not particularly familiar with DDOC. Is there some
documentation on creating new macros?
More information about the Digitalmars-d
mailing list