[odb-users] lazy_ptr and operator->
boris at codesynthesis.com
Fri Jun 5 12:52:51 EDT 2015
Andrew Cunningham <andrew at a-cunningham.com> writes:
> I was wondering why ODB does not do an automatic load() when the
> operator-> of a lazy pointer is called?
> The explicit use of load() seems quite a burden.
The reason is this: you have to call load() within a transaction.
Making operator->() implicitly call it would be very error prone.
More information about the odb-users