Generate docs for generated code?

user1234 user1234 at 12.de
Fri Jul 23 10:42:22 UTC 2021


On Friday, 23 July 2021 at 10:04:55 UTC, wjoe wrote:
> Is there a way for the compiler to consider doc comments in 
> auto generated, mixed in code?
> E.g.
> ```D
> string fooImpl = q{
>    /// Bar does fancy things.
>    const void bar() { /*do something fancy*/ }
> };
>
> /// This is Foo
> struct Foo(A, B, C) {
>   mixin(fooImpl);
> }
> ```
>
> So that the documentation for ```struct Foo``` has that of the 
> member ```bar()``` ?

unfortunately no and this is considered as a 
[bug](https://issues.dlang.org/show_bug.cgi?id=2420)


More information about the Digitalmars-d-learn mailing list