From 2bf2944a844d002267d3508ce81a2128ccbb8af7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 9 Nov 2015 18:14:37 +0200 Subject: Make database class move-constructible This means it can be returned by value from a function in C++11. --- odb/sqlite/database.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'odb/sqlite/database.hxx') 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 // std::ostream #include +#include // ODB_CXX11 #include #include @@ -84,6 +85,12 @@ namespace odb details::transfer_ptr = details::transfer_ptr ()); + // 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_; -- cgit v1.1