From: <sv...@op...> - 2024-12-20 12:15:47
|
Author: manx Date: Fri Dec 20 13:15:31 2024 New Revision: 22587 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22587 Log: [Ref] mpt/base/macros.hpp: Add MPT_CONSTEXPR23_FUN and MPT_CONSTEXPR23_VAR. Modified: trunk/OpenMPT/src/mpt/base/macros.hpp Modified: trunk/OpenMPT/src/mpt/base/macros.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/macros.hpp Fri Dec 20 13:09:16 2024 (r22586) +++ trunk/OpenMPT/src/mpt/base/macros.hpp Fri Dec 20 13:15:31 2024 (r22587) @@ -30,14 +30,25 @@ // constexpr + #define MPT_CONSTEXPRINLINE constexpr MPT_FORCEINLINE -#if MPT_CXX_AT_LEAST(20) + +#if MPT_CXX_AT_LEAST(23) +#define MPT_CONSTEXPR20_FUN constexpr MPT_FORCEINLINE +#define MPT_CONSTEXPR20_VAR constexpr +#define MPT_CONSTEXPR23_FUN constexpr MPT_FORCEINLINE +#define MPT_CONSTEXPR23_VAR constexpr +#elif MPT_CXX_AT_LEAST(20) #define MPT_CONSTEXPR20_FUN constexpr MPT_FORCEINLINE #define MPT_CONSTEXPR20_VAR constexpr -#else // !C++20 +#define MPT_CONSTEXPR23_FUN MPT_FORCEINLINE +#define MPT_CONSTEXPR23_VAR const +#else // C++ #define MPT_CONSTEXPR20_FUN MPT_FORCEINLINE #define MPT_CONSTEXPR20_VAR const -#endif // C++20 +#define MPT_CONSTEXPR23_FUN MPT_FORCEINLINE +#define MPT_CONSTEXPR23_VAR const +#endif // C++ |