How should I classify a typedef with Doxygen?

According to the Doxygen documentation there is a \typedef command. The command behaves the same as the \var command.


If you put the comment block in front of the typedef you don't need to use any special command.

/** This is the documentation for the following typedef */
typedef MyClass MyTypedef;

If you prefer to put it after the typedef use the following:

typedef MyClass MyTypedef;
/**< This is the documentation for the preceding typedef */

Only when the comment block must be at a different location than the actual typedef, you need to use \typedef.

Tags:

C++

Doxygen