Reputation: 127
I've got a rather general question: I've recently seen many #defines in C/C++ code that were commented with "/*< ... */", for example:
#define ARRSIZE(x) (sizeof(x)/sizeof(x[0])) /*< macro to determine the size of an array */
I personally only saw that in comments for defines and a search in Google didn't answer my question either. Does that have any meaning? Is that just common practice or does it come from Doxygen? Or is it any other reason?
Upvotes: 5
Views: 438
Reputation: 20619
Generally, <
is Doxygen's syntax for documentations that come after the item that they document.
An example from the "Putting documentation after members" section of the Doxygen documentation:
int var; /**< Detailed description after the member */
What's curious about the example you gave, though, is that it uses a normal comment block (/*
) as opposed to a documentation block (e.g., /**
). I suspect this is an oversight of the author of this specific example. Alternatively, it might be that the author extends this convention from documentation blocks to all comments similar in nature.
Upvotes: 9