Doxygen problems with handles


when creating documentation for my source code with doxygen I quite often recognize that doxygen has problems with handles. For example this declaration

Handle(TColgp_HArray1OfPnt2d) HandleOutputPoints( std::vector Points);

causes the error message

Found ';' while parsing initializer list! (doxygen could be confused by a macro call without semicolon).

These errors even spread: if doxygen gets confused with one declaration it sometimes can't even understand the following declarations.

I have already played around with the doxygen parameters for macro expansion (i.e. I allowed macro expansion), but this did not help.

Does anyone know a workaround so that I get correct documentation without error messages?

Thank you,

Benjamin Bihler's picture

Forgot to add: I use doxygen on Windows and on Linux.

Is there no one experiencing the same problems?

Forum supervisor's picture

Dear Benjamin,
You may try the trick we use in OCCT doc generator.
Define Handle and other OCCT-specific macros In Doxyfile as follows:



Benjamin Bihler's picture

Thank you very much! This works. For those who want to try the same trick: MACRO_EXPANSION should be set to YES in the doxyfile for the predefines to be used.