Skip to content

get_last_insert_id(): change parameter type long long & to std::int64_t & #1232

@Spixmaster

Description

@Spixmaster

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.

GCC does so to with -Wlong-long, https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wlong-long.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions