SRombauts / SQLiteCpp

SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
http://srombauts.github.io/SQLiteCpp
MIT License
2.22k stars 510 forks source link

Explicitly =delete; Statement::bindNoCopy(..., std::string&&) #469

Closed maysl closed 2 months ago

maysl commented 4 months ago

Rvalues are inherently unsuitable for no-copy binding, because their lifetime cannot be guaranteed. Separately declare, and delete, all overloads of bindNoCopy() that take a std::string rvalue.

maysl commented 4 months ago

Hi @SRombauts,

We ran into the issue that in a long sequence of legitimate bindNoCopy() calls, there was one that used a std::to_string() as its value. This sort of mistake can easily happen, but it's equally easy to mitigate. Hence the PR.

Thank You for your work!

UnixY2K commented 2 months ago

seems that the CI issue in macos is caused due to PEP 668, I will make a PR to fix the issue

UnixY2K commented 2 months ago

created #476 to fix the macOS CI issue

SRombauts commented 2 months ago

Thanks a lot for your contribution. Sébastien