GNOME Bugzilla – Bug 135016
Documentation for stuff in an anonymous namespace does not show up
Last modified: 2013-04-28 12:25:29 UTC
Running version 1.3.6, under RedHat 9. Code in the anonymous namespace does not get documented. For example... /** * @file * Demonstrate no docs for unnamed anon namespace */ /** * The foo namespace */ namespace foo { /** * The unnamed anonymous namespace */ namespace { /** * Some class for which no docs are generated */ class Blarg { public: /// Get the value int value() const { return value_; } /// Set the value void value(int i) { value_ = i; } private: int value_; }; } }
Oops, entered the incorrect version initially.
Also appears in 1.3.7 and on Windows in a similar scenario: in the XML output the anonymous namespace is generated empty, and the things declared inside it are put inside the file compound in which it is declared. See the attached zip file.
Created attachment 28349 [details] Demonstrates the problem in the XML output.
As far as I can tell, this still occurs in 1.4.6, both in HTML and XML output.
*** Bug 304552 has been marked as a duplicate of this bug. ***
*** Bug 336018 has been marked as a duplicate of this bug. ***
Updating version number based on information on newer reports.
The use of anonymous namespaces is nessesary for proper C++-programming. It's the only standard-conform way to hide implementation details. If doxygen is used for technical documentation of internals for system developers, it leads to deprecated stuff ("C-like static hack") or undocumented internalals. Doxygen is a first-class documentation tool, it *should* really implement this essential C++-language feature. (I wonder how this bug can stay new for more than two and a half years)
Works for me without problems (doxygen 1.5.3 on Windows), provided EXTRACT_ANON_NSPACES is set to YES in the doxygen configuration file.
I tested the above example with version 1.3.7 and the anonymous name space does not show up. When running it with 1.8.3.1 and the some Doxyfile, the anonymous name space is not shown, but as Christoph Schulz already remarked with EXTRACT_ANON_NSPACES set to YES the anonymous name space is shown. I think the problem has been solved by introducing the EXTRACT_ANON_NSPACES. I think the problem is resolved.
Setting to fixed as suggested. Please reopen this bug report if you still see this issue with the latest version of doxygen. Add a self-contained example (source+config file in a zip or tar) if possible.