Skip to content

Commit 42591d2

Browse files
committed
private: charconv: Don't define from_chars for libc++ 20 or later
LLVM libc++ starts to provide a float-point-capable std::from_chars() since LLVM 20 release. Unconditionally defining from_chars() when using Clang will cause ambiguous references and fails the build. Link: llvm/llvm-project#91651 # [1] Signed-off-by: Yao Zi <[email protected]>
1 parent 62f25cf commit 42591d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/podofo/private/charconv_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 10
88
#define WANT_CHARS_FORMAT
99
#endif
10-
#if (defined(__GNUC__) && !defined(__clang__) && !defined(__MINGW32__) && __GNUC__ < 11) || (defined(__MINGW32__) && __GNUC__ < 12) || defined(__clang__)
10+
#if (defined(__GNUC__) && !defined(__clang__) && !defined(__MINGW32__) && __GNUC__ < 11) || (defined(__MINGW32__) && __GNUC__ < 12) || (defined(__clang__) && defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION < 200000))
1111
#define WANT_FROM_CHARS
1212
#endif
1313
#if (defined(__GNUC__) && !defined(__clang__) && !defined(__MINGW32__) && __GNUC__ < 11) || (defined(__MINGW32__) && __GNUC__ < 12) || (defined(__clang__) && ((defined(__apple_build_version__) && __apple_build_version__ < 15000000) || __clang_major__ < 14))

0 commit comments

Comments
 (0)