diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-28 13:09:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-28 13:09:14 +0200 |
commit | 35a98e771162c0801bc85fc9d12152a23d0216e4 (patch) | |
tree | 7cbdc95021766042c11e1332924a852bcb2a245c | |
parent | 03529d414dd9afc3994995f1fdfb9df3c6d53826 (diff) |
Improve lazy pointer interface if C++11 is available
-rw-r--r-- | odb/qt/smart-ptr/lazy-ptr.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/odb/qt/smart-ptr/lazy-ptr.hxx b/odb/qt/smart-ptr/lazy-ptr.hxx index 9b22621..7000cf0 100644 --- a/odb/qt/smart-ptr/lazy-ptr.hxx +++ b/odb/qt/smart-ptr/lazy-ptr.hxx @@ -14,6 +14,7 @@ #include <odb/forward.hxx> // odb::database #include <odb/traits.hxx> #include <odb/lazy-ptr-impl.hxx> +#include <odb/details/config.hxx> // ODB_CXX11 template <class T> class QLazyWeakPointer; @@ -166,7 +167,11 @@ public: template <class X> QLazySharedPointer (database_type&, const QWeakPointer<X>&); +#ifdef ODB_CXX11 + template <class O = T> +#else template <class O /* = T */> +#endif typename odb::object_traits<O>::id_type objectId () const; @@ -334,7 +339,11 @@ public: // The objectId() function can only be called when the object is persistent, // or: toStrongRef().isNull() XOR loaded() (can use != for XOR). // +#ifdef ODB_CXX11 + template <class O = T> +#else template <class O /* = T */> +#endif typename odb::object_traits<O>::id_type objectId () const; |