Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

maysl
Copy link

@maysl maysl commented Jun 18, 2024

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.

Rvalues are inherently unsuitable for no-copy binding, because their lifetime cannot be guarnateed.
Separately declare, and delete, all overloads of bindNoCopy() that take a std::string rvalue.
@SRombauts SRombauts self-assigned this Jun 18, 2024
@maysl
Copy link
Author

maysl commented Jun 21, 2024

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
Copy link
Contributor

UnixY2K commented Aug 14, 2024

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

@UnixY2K
Copy link
Contributor

UnixY2K commented Aug 14, 2024

created #476 to fix the macOS CI issue

@SRombauts SRombauts merged commit c6032d8 into SRombauts:master Aug 15, 2024
13 of 14 checks passed
@SRombauts
Copy link
Owner

Thanks a lot for your contribution.
Sébastien

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants