diff options
Diffstat (limited to 'qt')
-rw-r--r-- | qt/common/containers/change-tracking/driver.cxx | 12 | ||||
-rw-r--r-- | qt/common/containers/change-tracking/test.hxx | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/qt/common/containers/change-tracking/driver.cxx b/qt/common/containers/change-tracking/driver.cxx index 644d100..c807c70 100644 --- a/qt/common/containers/change-tracking/driver.cxx +++ b/qt/common/containers/change-tracking/driver.cxx @@ -141,7 +141,11 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); +#ifdef HAVE_CXX11 + unique_ptr<object> p (db->load<object> ("1")); +#else auto_ptr<object> p (db->load<object> ("1")); +#endif assert (p->s._tracking ()); t.commit (); } @@ -528,7 +532,13 @@ main (int argc, char* argv[]) // Armed copy. // { + +#ifdef HAVE_CXX11 + unique_ptr<object> c; +#else auto_ptr<object> c; +#endif + { o.s.pop_back (); @@ -595,7 +605,7 @@ main (int argc, char* argv[]) // #ifdef HAVE_CXX11 { - auto_ptr<object> c; + unique_ptr<object> c; { o.s.pop_back (); diff --git a/qt/common/containers/change-tracking/test.hxx b/qt/common/containers/change-tracking/test.hxx index c792b19..dcebf2e 100644 --- a/qt/common/containers/change-tracking/test.hxx +++ b/qt/common/containers/change-tracking/test.hxx @@ -18,7 +18,11 @@ #include <odb/core.hxx> #include <odb/qt/list.hxx> +#ifdef HAVE_CXX11 +#pragma db object pointer(std::unique_ptr) +#else #pragma db object pointer(std::auto_ptr) +#endif struct object { object () {} |