aboutsummaryrefslogtreecommitdiff
path: root/qt/common
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-06-15 18:50:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-06-15 18:50:51 +0200
commit72f9ee644d3a048e68ba9570a096b6dd12c5ee1a (patch)
tree5670eaa8c20845b401c0b09bd0d643b971c675d9 /qt/common
parent766b7533addb5c981b135640321c291be270d907 (diff)
Get rid of C++11 deprecation warnings for auto_ptr, exception specs
In particular, std::auto_ptr is no longer mapped in C++11.
Diffstat (limited to 'qt/common')
-rw-r--r--qt/common/containers/change-tracking/driver.cxx12
-rw-r--r--qt/common/containers/change-tracking/test.hxx4
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 () {}