-
Notifications
You must be signed in to change notification settings - Fork 516
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
Binding BLOB requires narrowing conversion #430
Comments
Interestingly, I am pretty sure that this was handled in the past, where I made it support short/int/long/long long etc old types from C, but it was refactored to now rely on more modern types ala uint_t. It would make sense to perfectly support this use case and the STL in general, so I'll take a look at the current state of affairs. What is the system you are working on? |
For the record, I wasn't able to get a warning or a compilation error with the unit tests there are using size_t to bind a blob (tested with VS on Windows and clang on WSL) |
Looks like it's from clang-tidy, specifically bugprone-narrowing-conversions
Sounds like a real issue and that size_t should be the type that is accepted? |
Fix #430 for a better support of standard containers Also add a couple of tests (not covering all variants)
It's not a "real-life issue" since SQLiteCpp can only bind a blob with a size in int. |
@SRombauts There's no such limitation, |
Would be nice if the API took size_t or something so that I don't have to narrow it.
On my machine size_type (size_t) is unsigned long.
The text was updated successfully, but these errors were encountered: