After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 135016 - Documentation for stuff in an anonymous namespace does not show up
Documentation for stuff in an anonymous namespace does not show up
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.5.1
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
: 304552 336018 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-02-21 02:44 UTC by jody
Modified: 2013-04-28 12:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Demonstrates the problem in the XML output. (19.18 KB, application/zip)
2004-06-04 17:26 UTC, Andras Babos
Details

Description jody 2004-02-21 02:44:16 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_;
};

}
}
Comment 1 jody 2004-02-24 08:43:13 UTC
Oops, entered the incorrect version initially.
Comment 2 Andras Babos 2004-06-04 17:25:24 UTC
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.
Comment 3 Andras Babos 2004-06-04 17:26:41 UTC
Created attachment 28349 [details]
Demonstrates the problem in the XML output.
Comment 4 sconeu 2006-02-23 01:30:25 UTC
As far as I can tell, this still occurs in 1.4.6, both in HTML and XML output.
Comment 5 Kevin McBride 2006-11-27 23:06:58 UTC
*** Bug 304552 has been marked as a duplicate of this bug. ***
Comment 6 Kevin McBride 2006-11-27 23:07:35 UTC
*** Bug 336018 has been marked as a duplicate of this bug. ***
Comment 7 Kevin McBride 2006-11-27 23:08:42 UTC
Updating version number based on information on newer reports.
Comment 8 Wolf Peuker 2006-11-28 07:37:42 UTC
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)
Comment 9 Christoph Schulz 2007-10-15 11:34:07 UTC
Works for me without problems (doxygen 1.5.3 on Windows), provided EXTRACT_ANON_NSPACES is set to YES in the doxygen configuration file.
Comment 10 albert 2013-04-28 07:56:44 UTC
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.
Comment 11 Dimitri van Heesch 2013-04-28 12:25:29 UTC
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.