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
The function bool get_last_insert_id(std::string const &sequence, long long &value) has the unpleasant argument type long long &. This disallows passing even std::int64_t & because it equals to long &.
I prefer fixed width integers whose usage is not possible here.
The text was updated successfully, but these errors were encountered:
Spixmaster
changed the title
get_last_insert_id(): change parameter type long long to std::int64_tget_last_insert_id(): change parameter type long long to std::int64_tApr 13, 2025
Spixmaster
changed the title
get_last_insert_id(): change parameter type long long to std::int64_tget_last_insert_id(): change parameter type long long & to std::int64_t &Apr 13, 2025
Changing it would break compatibility, which is not something we should do without good reason, but we could add an overload taking int64_t if it's a different type from long long (it might not be).
The function
bool get_last_insert_id(std::string const &sequence, long long &value)
has the unpleasant argument typelong long &
. This disallows passing evenstd::int64_t &
because it equals tolong &
.I prefer fixed width integers whose usage is not possible here.
https://releases.llvm.org/11.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/google-runtime-int.html also disencourages the usage of
long long
.The text was updated successfully, but these errors were encountered: