Closed FreeSoaring closed 2 months ago
Hi @FreeSoaring
#define _LIBCPP_VERSION 110000
is correct? @raidenluikang reported in issue #1139 and @lemourin in PR #1183 that _LIBCPP_VERSION
was a 5-digit number and that's what I see in the their github repo for v11. They only changed to 6 digits in v16.你好@FreeSoaring
- 您确定该线路
#define _LIBCPP_VERSION 110000
错了吗?@raidenluikang问题在Android NDK 25上构建错误 #1139中报告了这个问题,@lemourin在 PR Fix 版本中检查保护 std::identity 的使用情况。 #1183是_LIBCPP_VERSION
一个 5 位数字,这是我在v11 的 github repo 中看到的。他们只在v16中将其改为6位数字。- 我假设我使用 sqlite_orm 1.8.2?@lemourin使用 PR修复版本检查保护 std::identity 用法问题。 #1183,它是在 1.8.2 之后发布的,位于 dev 分支中。
"Oh, I'm sorry, it is indeed a 5-digit number; I typed an extra 0. I am using the source code of sqlite_orm version 1.8.2 downloaded from the Releases section. In the source code, line 7958 uses the _LIBCPP_VERSION to determine if it is a 2-digit number. This can cause compilation issues with the error 'using std::identity; is not defined'. It should be modified to check for a 5-digit version. I manually modified it to:
#if (__cplusplus >= 202002L) && ((!\_LIBCPP\_VERSION || \_LIBCPP\_VERSION >= 13000) && (!\_GLIBCXX\_RELEASE || \_GLIBCXX\_RELEASE >= 10))}
After this change, the NDK compilation completed successfully."
@FreeSoaring can we close it now? https://github.com/fnc12/sqlite_orm/pull/1183 is merged
I think yes we can. Please feel free to reopen in case of anything
Issue: Incorrect Version Macro Check in
sqlite_orm.h
Description
The macro check for
_LIBCPP_VERSION
insqlite_orm.h
is incorrect. The_LIBCPP_VERSION
macro is defined in the NDK at$NDK_ROOT/sources/cxx-stl/llvm-libc++/include/__config
as follows:This means that the version number is in the format
major * 10000 + minor * 100 + patch
.Problematic Code
In
sqlite_orm.h
, line 7958, the version check is currently:Suggested Fix
The version check should be updated to match the format used by
_LIBCPP_VERSION
. The corrected macro should be:Rationale
This change ensures that the version comparison for
_LIBCPP_VERSION
is accurate, reflecting the actual versioning format used bylibc++
.Example
The corrected code should be: