From 0bf77eaad1fb2ad23f9aec64ea0fe3ab7cf06a28 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/mssql/database.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'odb/mssql/database.hxx') diff --git a/odb/mssql/database.hxx b/odb/mssql/database.hxx index d01ba30..de179bd 100644 --- a/odb/mssql/database.hxx +++ b/odb/mssql/database.hxx @@ -12,6 +12,7 @@ #include // std::ostream #include +#include // ODB_CXX11 #include #include @@ -138,6 +139,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&); @@ -591,6 +598,8 @@ namespace odb init (); private: + // Note: remember to update move ctor if adding any new members. + // std::string user_; std::string password_; std::string db_; -- cgit v1.1