Skip to content

Commit e2b9bbe

Browse files
committed
[Ref] mpt/base/macros.hpp: Add MPT_CONSTEXPR23_FUN and MPT_CONSTEXPR23_VAR.
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22587 56274372-70c3-4bfc-bfc3-4c3a0b034d27
1 parent 737c6f6 commit e2b9bbe

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/mpt/base/macros.hpp

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,25 @@
3030

3131

3232
// constexpr
33+
3334
#define MPT_CONSTEXPRINLINE constexpr MPT_FORCEINLINE
34-
#if MPT_CXX_AT_LEAST(20)
35+
36+
#if MPT_CXX_AT_LEAST(23)
3537
#define MPT_CONSTEXPR20_FUN constexpr MPT_FORCEINLINE
3638
#define MPT_CONSTEXPR20_VAR constexpr
37-
#else // !C++20
39+
#define MPT_CONSTEXPR23_FUN constexpr MPT_FORCEINLINE
40+
#define MPT_CONSTEXPR23_VAR constexpr
41+
#elif MPT_CXX_AT_LEAST(20)
42+
#define MPT_CONSTEXPR20_FUN constexpr MPT_FORCEINLINE
43+
#define MPT_CONSTEXPR20_VAR constexpr
44+
#define MPT_CONSTEXPR23_FUN MPT_FORCEINLINE
45+
#define MPT_CONSTEXPR23_VAR const
46+
#else // C++
3847
#define MPT_CONSTEXPR20_FUN MPT_FORCEINLINE
3948
#define MPT_CONSTEXPR20_VAR const
40-
#endif // C++20
49+
#define MPT_CONSTEXPR23_FUN MPT_FORCEINLINE
50+
#define MPT_CONSTEXPR23_VAR const
51+
#endif // C++
4152

4253

4354

0 commit comments

Comments
 (0)