[odb-users] Compilation error with custom lazy_shared_ptr
Boris Kolpackov
boris at codesynthesis.com
Mon Sep 22 04:39:12 EDT 2014
Hi Quentin,
Quentin Deldycke <quentindeldycke at gmail.com> writes:
> I created a reimplementation of odb::tr1::lazy_shared_ptr. (I derivate from
> it.)
>
> I have a compilation error:
>
> ../../../../include/odb/tr1/lazy-ptr.ixx:189:12: error: no match for
> ‘operator=’ (operand types are ‘std::tr1::shared_ptr<OTIdentifiant>’ and
> ‘odb::object_traits<OTIdentifiant>::pointer_type {aka OTIdentifiant*}’)
> p_ = i_.template load<T> (true); // Reset id.
You are getting this error because OTIdentifiant's object pointer is
the raw pointer and not std::tr1::shared_ptr. See Section 3.3, "Object
and View Pointers" in the ODB manual.
Boris
More information about the odb-users
mailing list