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.