[odb-users] Compile error when combining
query::[member].in_range and query::_ref([var])
Jeroen N. Witmond [Bahco]
jnw at xs4all.nl
Fri Feb 27 12:56:01 EST 2015
Hi Boris,
Boris Kolpackov wrote:
> Hi Jeroen,
>
> Jeroen N. Witmond [Bahco] <jnw at xs4all.nl> writes:
>
>> result r (db->query<FourPoint>
>> (query::latitude.in_range(query::_ref(lat_min),
>> query::_ref(lat_max)) &&
>> query::longitude.in_range(query::_ref(lon_min),
>> query::_ref(lon_max))));
>
> in_range() expects a pair of iterators. What you want is in().
My bad. I should have mentioned that latitude, longitude, and the
corresponding _min and _max variables are of type double. The _min and
_max variables define a range of values which, being of type double,
cannot be enumerated. I think this means neither in_range() nor in() is
suitable in this case.
Regards,
Jeroen.
More information about the odb-users
mailing list