diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-12-13 21:57:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-23 21:20:44 +0300 |
commit | fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 (patch) | |
tree | 6c8c1bfb5fe89f7378b92ac066b4ca8ecfd25228 /common/lazy-ptr/test.hxx | |
parent | 02367faedb16b6186e8852de47e5b749dc48c2df (diff) |
Switch to build2
Diffstat (limited to 'common/lazy-ptr/test.hxx')
-rw-r--r-- | common/lazy-ptr/test.hxx | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/common/lazy-ptr/test.hxx b/common/lazy-ptr/test.hxx index da1f2c4..f946029 100644 --- a/common/lazy-ptr/test.hxx +++ b/common/lazy-ptr/test.hxx @@ -4,8 +4,6 @@ #ifndef TEST_HXX #define TEST_HXX -#include <common/config.hxx> // HAVE_CXX11, HAVE_TR1_MEMORY - #include <vector> #include <string> #include <memory> @@ -13,11 +11,6 @@ #include <odb/core.hxx> #include <odb/lazy-ptr.hxx> -#if !defined(HAVE_CXX11) && defined(HAVE_TR1_MEMORY) -# include <odb/tr1/memory.hxx> -# include <odb/tr1/lazy-ptr.hxx> -#endif - // Raw pointer. // #pragma db namespace table("t1_") @@ -76,22 +69,16 @@ namespace test2 class obj; class cont; -#ifdef HAVE_CXX11 typedef std::unique_ptr<obj> obj_ptr; typedef std::unique_ptr<cont> cont_ptr; typedef odb::lazy_unique_ptr<obj> lazy_obj_ptr; -#else - typedef std::auto_ptr<obj> obj_ptr; - typedef std::auto_ptr<cont> cont_ptr; - typedef odb::lazy_auto_ptr<obj> lazy_obj_ptr; -#endif #pragma db object class cont { public: - cont () {} - cont (unsigned long i): id (i) {} + cont () = default; + cont (unsigned long id); #pragma db id unsigned long id; @@ -104,7 +91,7 @@ namespace test2 class obj { public: - obj () {} + obj () = default; obj (unsigned long i): id (i) {} #pragma db id @@ -117,19 +104,12 @@ namespace test2 // shared_ptr // -#if defined(HAVE_CXX11) || defined(HAVE_TR1_MEMORY) #pragma db namespace table("t3_") namespace test3 { -#ifdef HAVE_CXX11 using std::shared_ptr; using odb::lazy_shared_ptr; using odb::lazy_weak_ptr; -#else - using std::tr1::shared_ptr; - using odb::tr1::lazy_shared_ptr; - using odb::tr1::lazy_weak_ptr; -#endif class obj; @@ -163,6 +143,5 @@ namespace test3 lazy_shared_ptr<cont> c; }; } -#endif #endif // TEST_HXX |