From 549e979513e9aba6f7490a16dfd25dfe15a1b3fe Mon Sep 17 00:00:00 2001 From: Jakob Gamper <97gamjak@gmail.com> Date: Thu, 7 May 2026 15:48:59 +0200 Subject: [PATCH 1/3] add safety handling for automoc compilation to use only forward declarations there --- include/mstd/enum.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/mstd/enum.hpp b/include/mstd/enum.hpp index ba55f88..b6f2087 100644 --- a/include/mstd/enum.hpp +++ b/include/mstd/enum.hpp @@ -49,6 +49,7 @@ // ------------------------------------------------------------ // Main macro // ------------------------------------------------------------ +#ifndef Q_MOC_RUN #define MSTD_ENUM(EnumName, Underlying, LIST) \ enum class EnumName : Underlying \ { \ @@ -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) \ From fb7df784bc07f14bda4e04c3f72e96c22bb3847e Mon Sep 17 00:00:00 2001 From: Jakob Gamper <97gamjak@gmail.com> Date: Thu, 7 May 2026 15:50:08 +0200 Subject: [PATCH 2/3] update changelog file --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea54dd7..2c5d8a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 + ## [0.1.1](https://github.com/repo/owner/releases/tag/0.1.1) - 2026-03-09 From 63c6511cd60e7b0757433a6f1daaac3a97d66aa1 Mon Sep 17 00:00:00 2001 From: Jakob Gamper <97gamjak@gmail.com> Date: Thu, 7 May 2026 15:55:10 +0200 Subject: [PATCH 3/3] add suppression for unit library --- .cppcheck.suppress | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cppcheck.suppress b/.cppcheck.suppress index e0e3a7f..ca019ff 100644 --- a/.cppcheck.suppress +++ b/.cppcheck.suppress @@ -1 +1,2 @@ -unusedFunction \ No newline at end of file +unusedFunction +duplInheritedMember \ No newline at end of file