aboutsummaryrefslogtreecommitdiff
path: root/oracle
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 /oracle
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 'oracle')
-rw-r--r--oracle/types/driver.cxx4
-rw-r--r--oracle/types/test.hxx7
2 files changed, 11 insertions, 0 deletions
diff --git a/oracle/types/driver.cxx b/oracle/types/driver.cxx
index 8911635..6e13fcd 100644
--- a/oracle/types/driver.cxx
+++ b/oracle/types/driver.cxx
@@ -270,7 +270,11 @@ main (int argc, char* argv[])
//
{
db->persist (b3);
+#ifdef HAVE_CXX11
+ unique_ptr<descriptor> p (db->load<descriptor> (3));
+#else
auto_ptr<descriptor> p (db->load<descriptor> (3));
+#endif
assert (b3 == *p);
b3.blob.push_back (123);
db->update (b3);
diff --git a/oracle/types/test.hxx b/oracle/types/test.hxx
index 687f05e..2eaa6e5 100644
--- a/oracle/types/test.hxx
+++ b/oracle/types/test.hxx
@@ -5,6 +5,8 @@
#ifndef TEST_HXX
#define TEST_HXX
+#include <common/config.hxx> // HAVE_CXX11
+
#include <string>
#include <vector>
#include <memory> // std::auto_ptr
@@ -96,7 +98,12 @@ struct time_interval
int nanosecond;
};
+#ifdef HAVE_CXX11
+typedef std::unique_ptr<std::string> string_ptr;
+#else
typedef std::auto_ptr<std::string> string_ptr;
+#endif
+
typedef std::vector<std::string> strings;
#pragma db object