[odb-users] Compile error in XXX-odb.cxx when exchanging std::weak_ptr for odb::lazy_weak_ptr

Boris Kolpackov boris at codesynthesis.com
Mon Mar 21 11:35:22 EDT 2016

Hi Dieter,

dieter.govaerts at bricsys.com <dieter.govaerts at bricsys.com> writes:

> The problem is resolved when I remove the 'const' from the template
> argument. I like to have it with the 'const' however. How can I resolve
> this?

Can you replace line 13 in libodb/odb/lazy-ptr-impl.txx:

return static_cast<DB&> (db).template load<T> (id);


return static_cast<DB&> (db).template load<
  typename object_traits<T>::object_type> (id);

And let me know if it helps?


More information about the odb-users mailing list