summaryrefslogtreecommitdiff
path: root/odb-examples/c++11
diff options
context:
space:
mode:
Diffstat (limited to 'odb-examples/c++11')
-rw-r--r--odb-examples/c++11/buildfile2
-rw-r--r--odb-examples/c++11/driver.cxx4
-rw-r--r--odb-examples/c++11/employee.hxx10
-rw-r--r--odb-examples/c++11/testscript3
4 files changed, 9 insertions, 10 deletions
diff --git a/odb-examples/c++11/buildfile b/odb-examples/c++11/buildfile
index e921434..8788275 100644
--- a/odb-examples/c++11/buildfile
+++ b/odb-examples/c++11/buildfile
@@ -1,5 +1,5 @@
# file : c++11/buildfile
-# license : GNU GPL v2; see accompanying LICENSE file
+# license : not copyrighted - public domain
import libodb = libodb%lib{odb}
diff --git a/odb-examples/c++11/driver.cxx b/odb-examples/c++11/driver.cxx
index 68793b1..d722882 100644
--- a/odb-examples/c++11/driver.cxx
+++ b/odb-examples/c++11/driver.cxx
@@ -176,8 +176,8 @@ main (int argc, char* argv[])
// Search for Complex Systems Inc employees with the John first name.
//
{
- typedef odb::query<employee> query;
- typedef odb::result<employee> result;
+ using query = odb::query<employee>;
+ using result = odb::result<employee>;
session s;
transaction t (db->begin ());
diff --git a/odb-examples/c++11/employee.hxx b/odb-examples/c++11/employee.hxx
index a921e31..94bc4ba 100644
--- a/odb-examples/c++11/employee.hxx
+++ b/odb-examples/c++11/employee.hxx
@@ -34,7 +34,7 @@ public:
// Employees of this employer.
//
- typedef std::vector<odb::lazy_weak_ptr<employee>> employees_type;
+ using employees_type = std::vector<odb::lazy_weak_ptr<employee>>;
const employees_type&
employees () const
@@ -64,7 +64,7 @@ private:
class employee
{
public:
- typedef ::employer employer_type;
+ using employer_type = ::employer;
employee (const std::string& first,
const std::string& last,
@@ -89,7 +89,7 @@ public:
// Emails.
//
- typedef std::unordered_set<std::string> emails_type;
+ using emails_type = std::unordered_set<std::string>;
const emails_type&
emails () const
@@ -123,7 +123,7 @@ private:
employee () {}
#pragma db id auto
- unsigned long id_;
+ unsigned long long id_;
std::string first_;
std::string last_;
@@ -153,7 +153,7 @@ public:
// Members of this fund.
//
- typedef std::vector<odb::lazy_shared_ptr<employee>> members_type;
+ using members_type = std::vector<odb::lazy_shared_ptr<employee>>;
const members_type&
members () const
diff --git a/odb-examples/c++11/testscript b/odb-examples/c++11/testscript
index cb942f6..27634a3 100644
--- a/odb-examples/c++11/testscript
+++ b/odb-examples/c++11/testscript
@@ -1,12 +1,11 @@
# file : cxx11/testscript
-# license : GNU GPL v2; see accompanying LICENSE file
+# license : not copyrighted - public domain
.include ../database-options.testscript
.include ../$(database).testscript
+if! $sqlite
$create_schema
-end
: basics
: