Skip to content

Variadic macro expansion with comments #10960

@kanje

Description

@kanje

This is somewhat an extension to #8542.

I want to use inline comments to document enum values defined with a macro such as

/**
 * Enum with values.
 */
ENUM(Values,
    Value1, ///< First value.
    Value2, ///< Second value.
);

I did

PREDEFINED = "ENUM(t,...)=enum class t { __VA_ARGS__ }"

and this is what I am getting with doxygen -d preprocessor:

/**
 * Enum with values.
 */

///< First value.
///< Second value.
 enum class  Values  {  Value1,              Value2  };

I tried this with both Doxygen 1.9.5 and the latest master (1.12.0) --- the result is the same.

Would it be possible to somehow expand the macro while preserving the position of comments?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions