diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-09 18:14:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-09 18:14:37 +0200 |
commit | 0bf77eaad1fb2ad23f9aec64ea0fe3ab7cf06a28 (patch) | |
tree | 49d0ff8ee2f193c9eabfc67b06f1a2134d21a8b3 /odb/mssql/database.hxx | |
parent | ea61e19c6c0a52be4740448d0d21605e090b460d (diff) |
Make database class move-constructible
This means it can be returned by value from a function in C++11.
Diffstat (limited to 'odb/mssql/database.hxx')
-rw-r--r-- | odb/mssql/database.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
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 <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> @@ -138,6 +139,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&); @@ -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_; |