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 304552 - Classes in anonymous namespaces are not documented
Classes in anonymous namespaces are not documented
Status: RESOLVED DUPLICATE of bug 135016
Product: doxygen
Classification: Other
Component: build
1.4.x
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2005-05-17 17:45 UTC by Gerik Rhoden
Modified: 2006-11-27 23:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Source, config and HTML (19.86 KB, application/zip)
2005-05-17 17:47 UTC, Gerik Rhoden
Details

Description Gerik Rhoden 2005-05-17 17:45:52 UTC
In this file class c1 is not documented, and variable c1::v1 is documented as a
global. Doc for n2 and c2 is OK.

namespace           /// anonymous namespace
{

/// Doc for class c1 
class c1
{
public:
  int v1;  ///< some variable v1
};

}

namespace n         /// named namespace
{

/// Doc for class c2
class c2
{
public:
  int v2;  ///< some variable v2
};

}

Running Windows 1.4.3. This is also broken in 1.4.2, but 1.4.0 does document c1
as a class with global scope.
Comment 1 Gerik Rhoden 2005-05-17 17:47:55 UTC
Created attachment 46556 [details]
Source, config and HTML
Comment 2 Gerik Rhoden 2005-07-21 10:51:16 UTC
Still broken in 1.4.4
Comment 3 Gerik Rhoden 2005-10-05 11:37:04 UTC
Still broken in 1.4.5 Windows version
Comment 4 Kevin McBride 2005-11-06 18:09:33 UTC
Anonymous namespaces have different meanings across different compilers. 
Therefore, I do not believe this is a bug in doxygen.

All I can suggest to you is to avoid the use of anonymous namespaces.
Comment 5 Gerik Rhoden 2005-11-07 12:09:25 UTC
Unnamed namespaces are part of the C++ standard, therefore they should have 
the same meaning in all compilers.
All unnamed namespaces within the same translation unit have a unique internal 
name that is compiler dependant.

They used to work in previous versions on Doxygen.
Comment 6 Wolf Peuker 2006-10-18 14:06:29 UTC
(In reply to comment #4)
> Anonymous namespaces have different meanings across different compilers. 
> Therefore, I do not believe this is a bug in doxygen.
> 
> All I can suggest to you is to avoid the use of anonymous namespaces.

The use of unnamed namespaces is essential for proper C++-programming, the keyword "static" is deprecated, to hide classes or objects (of any kind) behind the header only is dangerous, the linker can generate crashing applications. Anonymous namespaces help to avoid global name-clashes from a local perspective. 

Doxygen should handle it properly.
Comment 7 Wolf Peuker 2006-11-22 10:22:14 UTC
the bug is present in version 1.5.0
Comment 8 Kevin McBride 2006-11-27 23:06:58 UTC
well... I found an older report to mark this bug report as a duplicate of.

*** This bug has been marked as a duplicate of 135016 ***