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

dieter.govaerts at bricsys.com dieter.govaerts at bricsys.com
Mon Mar 21 11:54:00 EDT 2016


Hello Boris,

>> 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);
> 
> With:
> 
> return static_cast<DB&> (db).template load<
>   typename object_traits<T>::object_type> (id);
> 
> And let me know if it helps?

That fixed it indeed. Thank you!

Dieter

PS Just for the public archives: it was line 31 in libodb/odb/lazy-ptr-impl.txx.




More information about the odb-users mailing list