diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-28 12:42:00 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-28 12:42:00 +0200 |
commit | eaf07e23f93813fa2c2e6b4d67e69fc6f4c48673 (patch) | |
tree | 3b6a54db5d3019121b0bbd553322248ce45db4c2 /odb/tr1/lazy-ptr.hxx | |
parent | 3012187847b2783c49153db3f5486b84074cb2b0 (diff) |
Support for C++11 std::shared_ptr/weak_ptr as object pointers
This includes odb::lazy_shared_ptr and odb::lazy_weak_ptr implementations.
Diffstat (limited to 'odb/tr1/lazy-ptr.hxx')
-rw-r--r-- | odb/tr1/lazy-ptr.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/odb/tr1/lazy-ptr.hxx b/odb/tr1/lazy-ptr.hxx index 0dea3f1..fade039 100644 --- a/odb/tr1/lazy-ptr.hxx +++ b/odb/tr1/lazy-ptr.hxx @@ -17,6 +17,7 @@ #include <odb/forward.hxx> // odb::database #include <odb/traits.hxx> #include <odb/lazy-ptr-impl.hxx> +#include <odb/details/config.hxx> // ODB_CXX11 namespace odb { @@ -114,7 +115,11 @@ namespace odb template <class Y> void reset (database_type&, const std::auto_ptr<Y>&); template <class Y> void reset (database_type&, const std::tr1::shared_ptr<Y>&); +#ifdef ODB_CXX11 + template <class O = T> +#else template <class O /* = T */> +#endif typename object_traits<O>::id_type object_id () const; database_type& database () const; @@ -217,7 +222,11 @@ namespace odb // The object_id() function can only be called when the object is // persistent, or: expired() XOR loaded() (can use != for XOR). // +#ifdef ODB_CXX11 + template <class O = T> +#else template <class O /* = T */> +#endif typename object_traits<O>::id_type object_id () const; database_type& database () const; |