I'm using Doxygen to document my code. Much of the code has anonymous namespaces in the cpp files where constants are defined. I have set:
EXTRACT_ANON_NSPACES = YES
in my Doxygen file and all anonymous namespaces are documented as desired.
My problem is that I want to reference a variable in an anonymous namespace. For example, suppose one of the namespaces is defined in my Doxygen document under MyClass::anonymous_namespace{MyFile.cpp}::kMyConstant
. I figured that another comment block (say, for a function) could link to that constant like:
@see MyClass::anonymous_namespace{MyFile.cpp}::kMyConstant
Unfortunately the only link I get is to MyFile.cpp, but not through the anonymous namespace to the constant variable. Obviously I want to do this so that if the value of the constant changes, the documentation will reference the new value when Doxygen is rerun. Putting the explicit value of the constant in the documentation would be dangerous if the constant ever changes.
Is my format above incorrect? I've searched for an answer for this extensively but to no avail.