[odb-users] A lot dependent ODB header files are included when we include the header file "odb::lazy_shared_ptr"

Boris Kolpackov boris at codesynthesis.com
Mon Aug 15 10:29:22 EDT 2016


Hi Albert,

Albert Gu <albert.gu at ringcentral.com> writes:

> When we try to include <odb/lazy-ptr.hxx> to use template class
> odb::lazy_shared_ptr, it will cause a lot dependent ODB header
> files are included. This will cause the compile time very slow.

Can you try to comment out inclusion of <odb/database.hxx> in
libodb/odb/lazy-ptr-impl.txx and see if that helps?

The consequence of this change is that you will now have to
make sure <odb/database.hxx> is included in source files that
initialize persistent lazy_ptr instances. But that is probably
acceptable (and is probably already the case anyway most of the
times).

Boris



More information about the odb-users mailing list