GNOME Bugzilla – Bug 304552
Classes in anonymous namespaces are not documented
Last modified: 2006-11-27 23:06:58 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.
Created attachment 46556 [details] Source, config and HTML
Still broken in 1.4.4
Still broken in 1.4.5 Windows version
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.
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.
(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.
the bug is present in version 1.5.0
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 ***