Well, you kind-of already can:
/// Kind of operation performed by a binary expression.
enum BinaryOperation {
/** Addition */ SUM,
/** Multiplication */ PRODUCT,
/** Exponentiation */ POWER,
/** Logarithm */ LOG,
};
That said, you could maybe make an argument that this could be covered by âinnerâ documentation:
/// Kind of operation performed by a binary expression.
enum BinaryOperation {
SUM, //! Addition
PRODUCT, //! Multiplication
POWER, //! Exponentiation
LOG, //! Logarithm
};
But⌠Iâm rather bullish on this. This only saves space in very simple cases where the reader is unlikely to be overloaded anyway.
Given that we already have âattach to nextâ and âattach to contextâ doc comments, I donât think overloading âattach to nextâ to also mean âattach to previousâ but only under some circumstances is a great idea. Thatâs keeping the number of comment types simple at the cost of making how they work more complex; itâs not a free win.