aboutsummaryrefslogtreecommitdiff
path: root/common/const-member/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/const-member/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/const-member/test.hxx')
-rw-r--r--common/const-member/test.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/const-member/test.hxx b/common/const-member/test.hxx
index 1928572..c858bbb 100644
--- a/common/const-member/test.hxx
+++ b/common/const-member/test.hxx
@@ -5,6 +5,8 @@
#ifndef TEST_HXX
#define TEST_HXX
+#include <common/config.hxx> // HAVE_CXX11
+
#include <vector>
#include <string>
#include <memory> // std::auto_ptr
@@ -102,9 +104,15 @@ struct wrapper
#pragma db id
unsigned long id;
+#ifdef HAVE_CXX11
+ const std::unique_ptr<const std::string> str;
+ const std::unique_ptr<const wrapped_value> com;
+ const std::unique_ptr<const std::vector<unsigned long>> vec;
+#else
const std::auto_ptr<const std::string> str;
const std::auto_ptr<const wrapped_value> com;
const std::auto_ptr< const std::vector<unsigned long> > vec;
+#endif
};
#endif // TEST_HXX