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/relationship/on-delete/driver.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'common/relationship/on-delete/driver.cxx') diff --git a/common/relationship/on-delete/driver.cxx b/common/relationship/on-delete/driver.cxx index b7cc37a..eec57cf 100644 --- a/common/relationship/on-delete/driver.cxx +++ b/common/relationship/on-delete/driver.cxx @@ -4,18 +4,20 @@ // Test ON DELETE functionality. // -#include // std::auto_ptr -#include +#include // std::unique_ptr #include #include #include -#include +#include #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include + using namespace std; using namespace odb::core; @@ -24,7 +26,7 @@ main (int argc, char* argv[]) { try { - auto_ptr db (create_database (argc, argv)); + unique_ptr db (create_database (argc, argv)); object o; @@ -60,13 +62,13 @@ main (int argc, char* argv[]) transaction t (db->begin ()); assert (db->find (c.id) == 0); - auto_ptr pcc (db->load (cc.id)); + unique_ptr pcc (db->load (cc.id)); assert (pcc->p.empty ()); - auto_ptr pn (db->load (n.id)); + unique_ptr pn (db->load (n.id)); assert (pn->p == 0); - auto_ptr pnc (db->load (nc.id)); + unique_ptr pnc (db->load (nc.id)); assert (pnc->p.size () == 1 && pnc->p[0] == 0); t.commit (); -- cgit v1.1