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 --- sqlite/attach/driver.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'sqlite/attach/driver.cxx') diff --git a/sqlite/attach/driver.cxx b/sqlite/attach/driver.cxx index 8d0672f..25d279f 100644 --- a/sqlite/attach/driver.cxx +++ b/sqlite/attach/driver.cxx @@ -4,8 +4,7 @@ // Test attached database support. // -#include // std::auto_ptr -#include +#include // std::unique_ptr #include #include @@ -14,11 +13,14 @@ #include #include -#include +#include #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include + using namespace std; namespace sqlite = odb::sqlite; using namespace sqlite; @@ -28,7 +30,7 @@ main (int argc, char* argv[]) { try { - auto_ptr mdb (create_specific_database (argc, argv)); + unique_ptr mdb (create_specific_database (argc, argv)); { object o ("one"); @@ -58,7 +60,7 @@ main (int argc, char* argv[]) { transaction t (c->begin ()); - auto_ptr p (adb.load (o.id)); + unique_ptr p (adb.load (o.id)); t.commit (); assert (p->str == o.str); @@ -76,7 +78,7 @@ main (int argc, char* argv[]) typedef sqlite::query query; transaction t (c->begin ()); - auto_ptr p (adb.query_one (query::str == "two")); + unique_ptr p (adb.query_one (query::str == "two")); t.commit (); assert (p->str == o.str); @@ -90,7 +92,7 @@ main (int argc, char* argv[]) { transaction t (c->begin ()); - auto_ptr p (mdb->load (o.id)); + unique_ptr p (mdb->load (o.id)); t.commit (); assert (p.get () != 0); -- cgit v1.1