Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2023-12-04 17:21:52


Andrey Semashev wrote:
> 4. I hope, there is a way to detect Mr. Docs in code by testing a
> predefined macro. This is useful in order to cleaning up the code for
> documentation. For example, I don't want private stuff like types in
> detail namespace to be present in the generated docs. I would also like
> to hide SFINAE tricks. For example, this page:
>
> https://mrdocs.com/demos/develop/boost-scope/multi/adoc-asciidoc/boost/scope/scope_exit-0a/2constructor.html
>
> should look more like this:
>
> https://lastique.github.io/scope/libs/scope/doc/html/boost/scope/scope_exit.html#idm3803-bb

Note that the way mrdocs works is by compiling the code with Clang
and extracting the information from the AST, so if you #ifdef MRDOCS
and put something arbitrary in the e.g. noexcept, it won't work
because the compilation will fail.

There should probably exist other @means to override what appears
in the noexcept (and the explicit, and the requires, and the enable_ifs...)
instead of ifdef-ing them to something that doesn't compile.

(Unless you want to maintain entirely separate, syntactically
valid, things just for the documentation.)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk