Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .cppcheck.suppress
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
unusedFunction
unusedFunction
duplInheritedMember
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

## Next Release

### Enum

- define only forward declaration if MOC_RUN compilation is processing enum definition

<!-- insertion marker -->
## [0.1.1](https://github.com/repo/owner/releases/tag/0.1.1) - 2026-03-09

Expand Down
4 changes: 4 additions & 0 deletions include/mstd/enum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
// ------------------------------------------------------------
// Main macro
// ------------------------------------------------------------
#ifndef Q_MOC_RUN
#define MSTD_ENUM(EnumName, Underlying, LIST) \
enum class EnumName : Underlying \
{ \
Expand Down Expand Up @@ -118,6 +119,9 @@
}; \
\
static constexpr EnumName##Meta enum_meta(EnumName) { return {}; }
#else
#define MSTD_ENUM(EnumName, Underlying, LIST) enum class EnumName : Underlying;
#endif

#define MSTD_ENUM_BITFLAG(EnumName, Underlying, LIST) \
MSTD_ENUM(EnumName, Underlying, LIST) \
Expand Down
Loading