From 476f21938f75553d6bff5e8780b537f7182c5675 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/oracle/database.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'odb/oracle/database.hxx') diff --git a/odb/oracle/database.hxx b/odb/oracle/database.hxx index 5534800..d4a0410 100644 --- a/odb/oracle/database.hxx +++ b/odb/oracle/database.hxx @@ -12,6 +12,7 @@ #include // std::ostream #include +#include // ODB_CXX11 #include #include @@ -80,6 +81,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&); @@ -505,6 +512,8 @@ namespace odb connection_ (); private: + // Note: remember to update move ctor if adding any new members. + // std::string user_; std::string password_; -- cgit v1.1