-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
UsageThe mentioned problem is not a doxygen problem but due to usage of a feature.The mentioned problem is not a doxygen problem but due to usage of a feature.
Description
Describe the bug
If I place an enum in a namespace (but not a class), then Doxygen does not document the enum values (ignores them).
Screenshots
-
When the enum is outside of a class, it is listed in the file page but missing the values:
-
When the enum is in a class, it is listed on the class page and shows the values:
To Reproduce
This is a header file where the enum's values are documented, but they do not appear in the first screenshot above:
/**
* \file
*/
#pragma once
namespace my_project::SomePart {
/**
* \brief Represents a type of some part.
*
* A SomePartType indicates the type of a my_project::SomePart::Part.
*/
enum class SomePartType
{
NotApplicable = 0, ///< This SomePartType does not have a type.
Foo, ///< This SomePartType is a foo.
Bar ///< This SomePartType is a bar.
};
/**
* \brief Represents a Part of a SomePart.
*
* A Part could be a Foo or a Bar.
*/
class Part
{
public:
/**
* \brief Constructs a Part with the given type and name.
*
* \param type The type of the Part.
* \param name The name of the part
*/
Part(
SomePartType type,
std::string name
);
/**
* \brief Gets the type of the Part.
*
* \return The my_project::Part::SomePartType of the Part.
*/
auto getType() const -> SomePartType;
protected:
private:
SomePartType m_type = SomePartType::NotApplicable;
std::string m_name;
};
} // namespace my_project::SomePart
And here is the file that produced the second screenshot (simply moved the enum):
/**
* \file
*/
#pragma once
namespace my_project::SomePart {
/**
* \brief Represents a Part of a SomePart.
*
* A Part could be a Foo or a Bar.
*/
class Part
{
public:
/**
* \brief Represents a type of some part.
*
* A SomePartType indicates the type of a my_project::SomePart::Part.
*/
enum class SomePartType
{
NotApplicable = 0, ///< This SomePartType does not have a type.
Foo, ///< This SomePartType is a foo.
Bar ///< This SomePartType is a bar.
};
/**
* \brief Constructs a Part with the given type and name.
*
* \param type The type of the Part.
* \param name The name of the part
*/
Part(
SomePartType type,
std::string name
);
/**
* \brief Gets the type of the Part.
*
* \return The my_project::Part::SomePartType of the Part.
*/
auto getType() const -> SomePartType;
protected:
private:
SomePartType m_type = SomePartType::NotApplicable;
std::string m_name;
};
} // namespace my_project::SomePart
Expected behavior
The enum's values should always be shown if documented.
Version
Doxygen: v1.8.14
OS: openSUSE Leap 15.6
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
UsageThe mentioned problem is not a doxygen problem but due to usage of a feature.The mentioned problem is not a doxygen problem but due to usage of a feature.