aboutsummaryrefslogtreecommitdiff
path: root/common/definition/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/definition/driver.cxx')
-rw-r--r--common/definition/driver.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/common/definition/driver.cxx b/common/definition/driver.cxx
index d909644..223eeaf 100644
--- a/common/definition/driver.cxx
+++ b/common/definition/driver.cxx
@@ -5,18 +5,20 @@
// useful to make composite values out of third-party types.
//
-#include <memory> // std::auto_ptr
-#include <cassert>
+#include <memory> // std::unique_ptr
#include <iostream>
#include <odb/database.hxx>
#include <odb/transaction.hxx>
-#include <common/common.hxx>
+#include <libcommon/common.hxx>
#include "test.hxx"
#include "test-odb.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace odb::core;
@@ -25,7 +27,7 @@ main (int argc, char* argv[])
{
try
{
- auto_ptr<database> db (create_database (argc, argv));
+ unique_ptr<database> db (create_database (argc, argv));
object o;
o.time.tv_sec = 1;
@@ -39,7 +41,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<object> p (db->load<object> (o.id));
+ unique_ptr<object> p (db->load<object> (o.id));
t.commit ();
assert (p->time.tv_sec == o.time.tv_sec &&