From 72f9ee644d3a048e68ba9570a096b6dd12c5ee1a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Jun 2016 18:50:51 +0200 Subject: Get rid of C++11 deprecation warnings for auto_ptr, exception specs In particular, std::auto_ptr is no longer mapped in C++11. --- qt/common/containers/change-tracking/driver.cxx | 12 +++++++++++- qt/common/containers/change-tracking/test.hxx | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'qt/common/containers/change-tracking') 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 p (db->load ("1")); +#else auto_ptr p (db->load ("1")); +#endif assert (p->s._tracking ()); t.commit (); } @@ -528,7 +532,13 @@ main (int argc, char* argv[]) // Armed copy. // { + +#ifdef HAVE_CXX11 + unique_ptr c; +#else auto_ptr c; +#endif + { o.s.pop_back (); @@ -595,7 +605,7 @@ main (int argc, char* argv[]) // #ifdef HAVE_CXX11 { - auto_ptr c; + unique_ptr 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 #include +#ifdef HAVE_CXX11 +#pragma db object pointer(std::unique_ptr) +#else #pragma db object pointer(std::auto_ptr) +#endif struct object { object () {} -- cgit v1.1