aboutsummaryrefslogtreecommitdiff
path: root/odb/mssql/auto-handle.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/mssql/auto-handle.hxx')
-rw-r--r--odb/mssql/auto-handle.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/odb/mssql/auto-handle.hxx b/odb/mssql/auto-handle.hxx
index 81f9246..e54e543 100644
--- a/odb/mssql/auto-handle.hxx
+++ b/odb/mssql/auto-handle.hxx
@@ -7,6 +7,8 @@
#include <odb/pre.hxx>
+#include <odb/details/config.hxx> // ODB_CXX11
+
#include <odb/mssql/mssql-fwd.hxx>
#include <odb/mssql/version.hxx>
@@ -62,6 +64,16 @@ namespace odb
h_ = h;
}
+#ifdef ODB_CXX11
+ auto_handle (auto_handle&& ah): h_ (ah.release ()) {}
+ auto_handle& operator= (auto_handle&& ah)
+ {
+ if (this != &ah)
+ reset (ah.release ());
+ return *this;
+ }
+#endif
+
private:
auto_handle (const auto_handle&);
auto_handle& operator= (const auto_handle&);