From fc70be62d8698496a20b6947d102757f426c5b3e 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/pgsql/database.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'odb/pgsql/database.hxx') diff --git a/odb/pgsql/database.hxx b/odb/pgsql/database.hxx index 6ad1ba9..bf77397 100644 --- a/odb/pgsql/database.hxx +++ b/odb/pgsql/database.hxx @@ -12,6 +12,7 @@ #include // std::ostream #include +#include // ODB_CXX11 #include #include @@ -78,6 +79,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&); @@ -470,6 +477,8 @@ namespace odb } private: + // Note: remember to update move ctor if adding any new members. + // std::string user_; std::string password_; std::string db_; -- cgit v1.1