Doc string facility in C++
You can use something like doxygen. It has support for generating man pages, among other formats.
Visual Studio can/will generate popups containing information extracted from DocXml formatted comments. You have to compile with /doc
, which will extract the XML from the comments to a .xdc
file. Then you have to run xdcmake
to compile the .xdc
files into an xml file. You'd typically handle all this automatically in the build process, so you don't have to do much manually (except write the comments themselves, of course). The one thing to keep in mind, however, is that the code (at least a declaration) has to build before you get the popups.
I feel obliged to add that IMO, most such comments are generally pretty close to useless. If a corporate standard makes them unavoidable, so be it -- but if they're honestly providing any useful information, I'd consider that an indication of a problem ("Code smell", if you prefer that wording). In most cases, the combination of the name of the function (or whatever) and the names/types of the parameters should make the use of the function quite clear.