hdoc
hdoc copied to clipboard
Methods declared in a macro are not present in the documentation
Here's a class f32: https://docs.hdoc.io/g/subspace/r603874E574DC6453.html
It has a ton of static and instance methods declared in macros: https://github.com/chromium/subspace/blob/main/num/float.h#L30-L31
However the documentation omits them all.
The same is true for other classes like this in the project, i32, i8, u8, etc.
I originally thought this was an issue with your ignore list, but upon further investigation I suspect that all definitions made as part of a macro are ignored, even if their path isn't in the ignore list. Seems like macros are an unavoidable part of C++, even on the bleeding edge of C++20. Consequently we may have to add support for this.
We will investigate this further and get back to you.
For posterity, my original comment is below.
I think in your case they might be getting caught by the ignore rule that you have here:
https://github.com/chromium/subspace/blob/main/.hdoc.toml#L23
And because of that they're not being indexed.
- As far as hdoc is concerned all of those types are being defined in the following path:
subspace/num/__private/float_macros.h- hdoc then goes and checks the ignore path list defined in
.hdoc.toml, sees a string with the value__private- When hdoc finds your methods it sees that the ignore list string
__privateis a substring of the path your functions are defined in (subspace/num/__private/float_macros.h), and doesn't index them- As a result, all of those methods are omitted from the HTML output
Thank you :) And FWIW macros actually got new stuff in C++20 too heh. https://www.scs.stanford.edu/~dm/blog/va-opt.html
On Fri, Oct 28, 2022 at 8:10 PM hdoc @.***> wrote:
I originally thought this was an issue with your ignore list, but upon further investigation I suspect that all definitions made as part of a macro are ignored, even if their path isn't in the ignore list. Seems like macros are an unavoidable part of C++, even on the bleeding edge of C++20. Consequently we may have to add support for this.
We will investigate this further and get back to you.
For posterity, my original comment is below.
I think in your case they might be getting caught by the ignore rule that you have here:
https://github.com/chromium/subspace/blob/main/.hdoc.toml#L23
And because of that they're not being indexed.
- As far as hdoc is concerned all of those types are being defined in the following path: subspace/num/__private/float_macros.h
- hdoc then goes and checks the ignore path list defined in .hdoc.toml, sees a string with the value __private
- When hdoc finds your methods it sees that the ignore list string __private is a substring of the path your functions are defined in ( subspace/num/__private/float_macros.h), and doesn't index them
- As a result, all of those methods are omitted from the HTML output
— Reply to this email directly, view it on GitHub https://github.com/hdoc/hdoc/issues/34#issuecomment-1295654678, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTS2LY2NAZFLVVITPRP3LWFRTQFANCNFSM6AAAAAARREHL6U . You are receiving this because you authored the thread.Message ID: @.***>