From: <sv...@op...> - 2024-07-22 18:27:23
|
Author: manx Date: Mon Jul 22 20:27:16 2024 New Revision: 21249 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21249 Log: Merged revision(s) 21247 from trunk/OpenMPT: [Fix] mpt/base/numbers.hpp: Work-around missing numbers header in Android NDK r23, r24, r25 (which do ship only libc++ 11). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp branches/OpenMPT-1.31/src/mpt/base/numbers.hpp Modified: branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Mon Jul 22 20:24:02 2024 (r21248) +++ branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Mon Jul 22 20:27:16 2024 (r21249) @@ -312,4 +312,10 @@ +#if MPT_OS_ANDROID && MPT_LIBCXX_LLVM_BEFORE(17000) +#define MPT_LIBCXX_QUIRK_NO_NUMBERS +#endif + + + #endif // MPT_BASE_DETECT_QUIRKS_HPP Modified: branches/OpenMPT-1.31/src/mpt/base/numbers.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/base/numbers.hpp Mon Jul 22 20:24:02 2024 (r21248) +++ branches/OpenMPT-1.31/src/mpt/base/numbers.hpp Mon Jul 22 20:27:16 2024 (r21249) @@ -6,9 +6,10 @@ #include "mpt/base/detect_compiler.hpp" +#include "mpt/base/detect_quirks.hpp" #include "mpt/base/namespace.hpp" -#if MPT_CXX_AT_LEAST(20) +#if MPT_CXX_AT_LEAST(20) && !defined(MPT_LIBCXX_QUIRK_NO_NUMBERS) #include <numbers> #else #include <type_traits> @@ -25,7 +26,7 @@ namespace numbers { -#if MPT_CXX_AT_LEAST(20) +#if MPT_CXX_AT_LEAST(20) && !defined(MPT_LIBCXX_QUIRK_NO_NUMBERS) template <typename T> inline constexpr T e_v = std::numbers::e_v<T>; |