diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-15 18:50:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-15 18:50:51 +0200 |
commit | 72f9ee644d3a048e68ba9570a096b6dd12c5ee1a (patch) | |
tree | 5670eaa8c20845b401c0b09bd0d643b971c675d9 /common/inheritance/polymorphism/test6.hxx | |
parent | 766b7533addb5c981b135640321c291be270d907 (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/inheritance/polymorphism/test6.hxx')
-rw-r--r-- | common/inheritance/polymorphism/test6.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/inheritance/polymorphism/test6.hxx b/common/inheritance/polymorphism/test6.hxx index 1682b3f..c12b5f4 100644 --- a/common/inheritance/polymorphism/test6.hxx +++ b/common/inheritance/polymorphism/test6.hxx @@ -5,6 +5,8 @@ #ifndef TEST6_HXX #define TEST6_HXX +#include <common/config.hxx> // HAVE_CXX11 + #include <string> #include <memory> @@ -16,7 +18,11 @@ #pragma db namespace table("t6_") namespace test6 { +#ifdef HAVE_CXX11 + #pragma db object polymorphic pointer(std::unique_ptr) +#else #pragma db object polymorphic pointer(std::auto_ptr) +#endif struct root { virtual ~root () {} @@ -55,7 +61,11 @@ namespace test6 unsigned long dnum; std::string dstr; +#ifdef HAVE_CXX11 + std::unique_ptr<root> ptr; +#else std::auto_ptr<root> ptr; +#endif void db_callback (odb::callback_event, odb::database&) const; |