diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-15 16:29:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-15 16:29:47 +0200 |
commit | 42ad88d4d878bcf3b2ca3b2d23ff2106a6bdafb8 (patch) | |
tree | 88892a234e29bc9487d59b9d758249ab0c3c7faa | |
parent | 3c02d27932fcca6443989606e49466a7bb84afd3 (diff) |
Remove inclusion of <odb/database.hxx> from lazy-ptr header
Its inclusion slowed down compilation significantly.
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
time).
-rw-r--r-- | odb/lazy-ptr-impl.txx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/odb/lazy-ptr-impl.txx b/odb/lazy-ptr-impl.txx index f12f7fe..83bb58a 100644 --- a/odb/lazy-ptr-impl.txx +++ b/odb/lazy-ptr-impl.txx @@ -2,8 +2,6 @@ // copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include <odb/database.hxx> - namespace odb { // @@ -28,6 +26,9 @@ namespace odb typename object_traits<T>::pointer_type lazy_ptr_base:: loader (database_type& db, const typename object_traits<T>::id_type& id) { + // Compiler error pointing here? Perhaps you did not include + // <odb/database.hxx>? + // return static_cast<DB&> (db).template load< typename object_traits<T>::object_type> (id); } |