You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Incorrect Version Macro Check in sqlite_orm.h
Description
The macro check for _LIBCPP_VERSION in sqlite_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:
#define_LIBCPP_VERSION110000
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:
"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:
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:#if (__cplusplus >= 202002L) && ((!_LIBCPP_VERSION || _LIBCPP_VERSION >= 13) && (!_GLIBCXX_RELEASE || _GLIBCXX_RELEASE >= 10))
Suggested Fix
The version check should be updated to match the format used by
_LIBCPP_VERSION
. The corrected macro should be:#if (__cplusplus >= 202002L) && ((!_LIBCPP_VERSION || _LIBCPP_VERSION >= 130000) && (!_GLIBCXX_RELEASE || _GLIBCXX_RELEASE >= 10))
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:
The text was updated successfully, but these errors were encountered: