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/composite/driver.cxx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'common/composite/driver.cxx') diff --git a/common/composite/driver.cxx b/common/composite/driver.cxx index cefd72b..06b24b2 100644 --- a/common/composite/driver.cxx +++ b/common/composite/driver.cxx @@ -4,14 +4,13 @@ // Test composite value types. // -#include // std::auto_ptr -#include +#include // std::unique_ptr #include #include #include -#include +#include #include "test.hxx" #include "test-odb.hxx" @@ -19,12 +18,15 @@ using namespace std; using namespace odb::core; +#undef NDEBUG +#include + int main (int argc, char* argv[]) { try { - auto_ptr db (create_database (argc, argv)); + unique_ptr db (create_database (argc, argv)); // Test basic composite functionality. // @@ -55,7 +57,7 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr p1 (db->load (1)); + unique_ptr p1 (db->load (1)); t.commit (); assert (p == *p1); @@ -78,7 +80,7 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr p1 (db->load (1)); + unique_ptr p1 (db->load (1)); t.commit (); assert (p == *p1); @@ -157,7 +159,7 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr o1 (db->load (1)); + unique_ptr o1 (db->load (1)); t.commit (); assert (o == *o1); @@ -184,7 +186,7 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr o1 (db->load (1)); + unique_ptr o1 (db->load (1)); t.commit (); assert (o == *o1); @@ -212,7 +214,7 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr o1 (db->load (1)); + unique_ptr o1 (db->load (1)); t.commit (); assert (o == *o1); -- cgit v1.1