You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std::vector<int> ids;
sql << "SELECT ID FROM TABLE", soci::into(ids);
It triggers soci_error("Vectors of size 0 are not allowed.") in src/backends/.../vector-into-type.cpp
However, if I write
std::vector<int> ids(1);
or initialize the capacity to any size larger than 0 the code can run. Is the error intentionally designed to throw if the size of the vector is 0? If so, why is it needed since into will automatically resize the vector?
The text was updated successfully, but these errors were encountered:
According to the documentation https://soci.sourceforge.net/doc/master/binding/, I write
It triggers soci_error("Vectors of size 0 are not allowed.") in src/backends/.../vector-into-type.cpp
However, if I write
or initialize the capacity to any size larger than 0 the code can run. Is the error intentionally designed to throw if the size of the vector is 0? If so, why is it needed since into will automatically resize the vector?
The text was updated successfully, but these errors were encountered: