Next: Header files and header inclusion, Previous: Macros and code sanity, Up: Preprocessor-level specifications
Don't write:
/// Declaration of the Foo class. class Foo { ... };
It is so obvious that you're documenting the class and the constructor that you should not write it down. Instead of documenting the kind of an entity (class, function, namespace, destructor...), document its goal.
/// \brief Swap the reference with another. /// The method swaps the two references and returns the first. ref& swap (ref& other);
write:
/// @brief Swap the reference with another. /// Swap the two references and return the first. ref& swap (ref& other);
The same rules apply to ChangeLogs.
Rationale: The clients of your interfaces will read your headers to know how your library or module works. They don't want to dig in the implementation to find the documentation.
Rationale: The code is much more read that written and you should favor the (many) readers instead of the (often only) implementer.
Rationale: Doing so leaves you some room to comment your implementation.