[odb-users] boost::optional query::in_range compile error

Markus Klemm markus at markusklemm.net
Fri Nov 13 06:04:02 EST 2015


Hi there again,

is it possible that query::in_range when used with boost::optional data members? (in a container of course and used with their iterator).

Using ODB 2.4.0 and VS 2013,  let the example object have the member:
(full example syntax highlighted here: https://gist.github.com/Superlokkus/7fc1545f33d10d2caae8 )
boost::optional<bool> is_ok;
and a translation unit using
std::vector<decltype(object::is_ok)> values; odb::query<object>::is_ok.in_range(values.cbegin(), values.cend());

one will get the compile error:
error C2665: 'odb::mssql::val_bind<T>::val_bind' : none of the 2 overloads could convert all the argument types

Defining the member as non-optional worked as usual.

Regards (and thank you in advance to Boris probably ;-) )

Markus Klemm



More information about the odb-users mailing list