aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/database.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-09 18:14:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-09 18:14:37 +0200
commit2bf2944a844d002267d3508ce81a2128ccbb8af7 (patch)
tree32732629cdd48b789242e6a8dc1673c593f6fb8f /odb/sqlite/database.hxx
parent857fabab0c537a286e8a39503bf987029669d854 (diff)
Make database class move-constructible
This means it can be returned by value from a function in C++11.
Diffstat (limited to 'odb/sqlite/database.hxx')
-rw-r--r--odb/sqlite/database.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/odb/sqlite/database.hxx b/odb/sqlite/database.hxx
index f7f3994..f846f9e 100644
--- a/odb/sqlite/database.hxx
+++ b/odb/sqlite/database.hxx
@@ -14,6 +14,7 @@
#include <iosfwd> // std::ostream
#include <odb/database.hxx>
+#include <odb/details/config.hxx> // ODB_CXX11
#include <odb/details/unique-ptr.hxx>
#include <odb/details/transfer-ptr.hxx>
@@ -84,6 +85,12 @@ namespace odb
details::transfer_ptr<connection_factory> =
details::transfer_ptr<connection_factory> ());
+ // Move-constructible but not move-assignable.
+ //
+#ifdef ODB_CXX11
+ database (database&&);
+#endif
+
static void
print_usage (std::ostream&);
@@ -458,6 +465,8 @@ namespace odb
connection_ ();
private:
+ // Note: remember to update move ctor if adding any new members.
+ //
std::string name_;
int flags_;
bool foreign_keys_;