Skip to content

Commit 0813466

Browse files
committed
Add MSVC macro counting workaround
1 parent 0458e4e commit 0813466

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

wise_enum_detail.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,12 @@ WISE_ENUM_CONSTEXPR_14 bool compare(U u1, U u2) {
9595
} // namespace detail
9696
} // namespace wise_enum
9797

98+
// MSVC workaround
99+
#define WISE_ENUM_IMPL_EXPAND(X) X
100+
98101
#define WISE_ENUM_IMPL_NARG(...) \
99-
WISE_ENUM_IMPL_NARG_(__VA_ARGS__, WISE_ENUM_IMPL_RSEQ_N())
102+
WISE_ENUM_IMPL_EXPAND( \
103+
WISE_ENUM_IMPL_NARG_(__VA_ARGS__, WISE_ENUM_IMPL_RSEQ_N()))
100104
#define WISE_ENUM_IMPL_NARG_(...) WISE_ENUM_IMPL_ARG_N(__VA_ARGS__)
101105

102106
// ARG_N and RSEQ_N defined in wise_enum_generated.h

0 commit comments

Comments
 (0)