aboutsummaryrefslogtreecommitdiff
path: root/common/bulk/test.hxx
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 /common/bulk/test.hxx
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 'common/bulk/test.hxx')
-rw-r--r--common/bulk/test.hxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/common/bulk/test.hxx b/common/bulk/test.hxx
index 85cb5c3..ce55158 100644
--- a/common/bulk/test.hxx
+++ b/common/bulk/test.hxx
@@ -32,10 +32,11 @@ namespace test1
std::string s;
};
- #pragma db object bulk(3) pointer(std::auto_ptr)
- struct auto_object
+#ifdef HAVE_CXX11
+ #pragma db object bulk(3) pointer(std::unique_ptr)
+ struct unique_object
{
- auto_object (unsigned int n_ = 0, std::string s_ = "")
+ unique_object (unsigned int n_ = 0, std::string s_ = "")
: id (0), n (n_), s (s_) {}
#pragma db id auto
@@ -44,12 +45,11 @@ namespace test1
unsigned int n;
std::string s;
};
-
-#ifdef HAVE_CXX11
- #pragma db object bulk(3) pointer(std::unique_ptr)
- struct unique_object
+#else
+ #pragma db object bulk(3) pointer(std::auto_ptr)
+ struct auto_object
{
- unique_object (unsigned int n_ = 0, std::string s_ = "")
+ auto_object (unsigned int n_ = 0, std::string s_ = "")
: id (0), n (n_), s (s_) {}
#pragma db id auto
@@ -176,16 +176,16 @@ namespace test6
#pragma db object(object) bulk(3)
#pragma db member(object::id) id auto
- typedef object_template<2> auto_object;
-
- #pragma db object(auto_object) bulk(3) pointer(std::auto_ptr)
- #pragma db member(auto_object::id) id auto
-
#ifdef HAVE_CXX11
typedef object_template<3> unique_object;
#pragma db object(unique_object) bulk(3) pointer(std::unique_ptr)
#pragma db member(unique_object::id) id auto
+#else
+ typedef object_template<2> auto_object;
+
+ #pragma db object(auto_object) bulk(3) pointer(std::auto_ptr)
+ #pragma db member(auto_object::id) id auto
#endif
}