std::vector<soci::row>::resize() The specified type does not meet the requirements of Cpp17MoveInsertable
using namespace soci;
constexpr int BATCH_SIZE = 30;
std::vector<row> rows(BATCH_SIZE);
statement st = (sql.prepare << "select * from table", into(rows));
st.execute();
while (st.fetch()) {
std::vector<int>::iterator pos;
for (pos = valsOut.begin(); pos != valsOut.end(); ++pos) {
cout << *pos << '\n';
}
rows.resize(BATCH_SIZE); //ERROR
}
In template: static_assert failed due to requirement '__is_cpp17_move_insertable<std::allocator<soci::row>, false>::value' "The specified type does not meet the requirements of Cpp17MoveInsertable"
This is clearly related to your Peer class which must not be default constructible or something like this. When reporting a bug, please provide a simple self-contained example reproducing the problem, not just some snippet of code.
Could you reread the error message once more?
In template: static_assert failed due to requirement '__is_cpp17_move_insertable<std::allocator<soci::row>, false>::value' "The specified type does not meet the requirements of Cpp17MoveInsertable"
It tells nothing related to my code. The problem is with soci::row!
And as you could also see my class Peer existed only in a function parameters, (now removed) and does not participate.
Sorry, I didn't notice/realize you used vector of rows. We need to make row movable to fix this.
Yes. Thanks a lot for understanding and attention.
Sorry, I didn't notice/realize you used vector of rows. We need to make row movable to fix this. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SOCI/soci/issues/900#issuecomment-887597886 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJH3F3SLLZV4663ETRH4ODTZ3EKTANCNFSM5A63UCQA .