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...
should look more like this:
https://lastique.github.io/scope/libs/scope/doc/html/boost/scope/scope_exit....
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.)