Thread overview
[Issue 16462] mixin template ddoc doesn't appear in docs
Sep 02, 2016
Manu
Sep 04, 2016
Andrej Mitrovic
Jun 26, 2017
Vladimir Panteleev
September 02, 2016
https://issues.dlang.org/show_bug.cgi?id=16462

Manu <turkeyman@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86_64                      |All
                 OS|Windows                     |All

--- Comment #1 from Manu <turkeyman@gmail.com> ---
eg:

mixin template Test(T)
{
  /** doco */
  T member;
}

/** My struct */
struct S
{
  mixin Test!int;
}


'member' is not documented.

--
September 04, 2016
https://issues.dlang.org/show_bug.cgi?id=16462

Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com

--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> ---
It looks like an edge-case. The workaround is to make the mixin itself also documented. So just add `///` to Test, e.g.

///
mixin template Test(T)


The mixin's body being documented was fixed as part of Issue 648.

I think your bug report is legit though and should be fixed.

--
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=16462

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dlang-bugzilla@thecybershad
                   |                            |ow.net
         Resolution|---                         |INVALID

--- Comment #3 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
It's the same as with any other composite declaration - you have to document the top-level declaration so that the nested declarations are rendered. E.g. here the documentation will be blank:

struct S
{
    /// foo
    int foo;
}

So, it's not specific to mixin templates.

Not sure if it's by design or not, but in any case, having a composite declaration without documentation with members that do have documentation in it might look weird at least in some DDoc themes.

Closing this seeing as there was some confusion as to the nature of the bug and a workaround has been fonud; please reopen or file a new bug if you have a use case for doing the above.

--