From fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 13 Dec 2023 21:57:53 +0300 Subject: Switch to build2 --- common/wrapper/test.hxx | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) (limited to 'common/wrapper/test.hxx') diff --git a/common/wrapper/test.hxx b/common/wrapper/test.hxx index 27d020b..3ae4151 100644 --- a/common/wrapper/test.hxx +++ b/common/wrapper/test.hxx @@ -4,19 +4,13 @@ #ifndef TEST_HXX #define TEST_HXX -#include // HAVE_CXX11, HAVE_TR1_MEMORY - #include -#include // std::auto_ptr +#include // std::unique_ptr #include #include #include -#if !defined(HAVE_CXX11) && defined(HAVE_TR1_MEMORY) -# include -#endif - using odb::nullable; // Test 1: simple values. @@ -26,17 +20,9 @@ namespace test1 { typedef nullable nullable_string; -#ifdef HAVE_CXX11 typedef std::unique_ptr num_uptr; typedef std::unique_ptr str_uptr; typedef std::shared_ptr str_sptr; -#else - typedef std::auto_ptr num_uptr; - typedef std::auto_ptr str_uptr; -# ifdef HAVE_TR1_MEMORY - typedef std::tr1::shared_ptr str_sptr; -# endif -#endif #pragma db object table("obj1") struct object1 @@ -59,13 +45,11 @@ namespace test1 #pragma db id auto unsigned long id_; -#if defined(HAVE_CXX11) || defined(HAVE_TR1_MEMORY) #pragma db null str_sptr sstr; #pragma db value_null std::vector sstrs; -#endif }; } @@ -110,15 +94,9 @@ operator== (const comp2& x, const comp2& y) struct comp3; -#ifdef HAVE_CXX11 typedef std::unique_ptr comp1_uptr; typedef std::unique_ptr comp2_uptr; typedef std::unique_ptr comp3_uptr; -#else -typedef std::auto_ptr comp1_uptr; -typedef std::auto_ptr comp2_uptr; -typedef std::auto_ptr comp3_uptr; -#endif #pragma db object struct comp_object @@ -153,13 +131,8 @@ struct comp_object2 // Containers. // -#ifdef HAVE_CXX11 typedef std::unique_ptr> nums_uptr; typedef std::unique_ptr> strs_uptr; -#else -typedef std::auto_ptr > nums_uptr; -typedef std::auto_ptr > strs_uptr; -#endif #pragma db value struct cont_comp @@ -195,7 +168,7 @@ namespace test5 base () {} base (int n): num (n) {} - int num; + int num = 0; }; inline bool @@ -230,11 +203,7 @@ namespace test5 unsigned long id; #pragma db null -#ifdef HAVE_CXX11 std::unique_ptr p; -#else - std::auto_ptr p; -#endif odb::nullable n; -- cgit v1.1