From eaf07e23f93813fa2c2e6b4d67e69fc6f4c48673 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Feb 2012 12:42:00 +0200 Subject: Support for C++11 std::shared_ptr/weak_ptr as object pointers This includes odb::lazy_shared_ptr and odb::lazy_weak_ptr implementations. --- odb/tr1/lazy-ptr.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'odb/tr1/lazy-ptr.hxx') 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::database #include #include +#include // ODB_CXX11 namespace odb { @@ -114,7 +115,11 @@ namespace odb template void reset (database_type&, const std::auto_ptr&); template void reset (database_type&, const std::tr1::shared_ptr&); +#ifdef ODB_CXX11 + template +#else template +#endif typename object_traits::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 +#else template +#endif typename object_traits::id_type object_id () const; database_type& database () const; -- cgit v1.1