soci
soci copied to clipboard
`get_last_insert_id()`: change parameter type `long long &` to `std::int64_t &`
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.
clang-tidy also disencourages the usage of long long, https://releases.llvm.org/11.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/google-runtime-int.html.
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).