[odb-users] use of unique_ptr in odb::connection::cache_query

Boris Kolpackov boris at codesynthesis.com
Mon Feb 24 08:50:19 EST 2020


Quentin Deldycke <quentindeldycke at gmail.com> writes:

>     c.cache_query(pq, p);

cache_query() assumes ownership of the second argument (parameters)
and with unique_ptr you need an explicit move to signal that you are
relinquishing ownership:

c.cache_query(pq, std::move (p));



More information about the odb-users mailing list