aboutsummaryrefslogtreecommitdiff
path: root/odb/vector-impl.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-05-11 06:52:02 -0400
committerBoris Kolpackov <boris@codesynthesis.com>2013-06-11 18:21:40 +0200
commita77412ed3603c86e3a5043e678e7e8abb09b1fc8 (patch)
tree99ca2023366b99da0d9141ee8160712c0d7ae26a /odb/vector-impl.ixx
parent4fa9af2045dee259949c89cc6e0fa93adc326869 (diff)
Make move constructor inline
C++11 support has to be inline or template.
Diffstat (limited to 'odb/vector-impl.ixx')
-rw-r--r--odb/vector-impl.ixx15
1 files changed, 14 insertions, 1 deletions
diff --git a/odb/vector-impl.ixx b/odb/vector-impl.ixx
index 41360b8..9fdadfb 100644
--- a/odb/vector-impl.ixx
+++ b/odb/vector-impl.ixx
@@ -3,7 +3,7 @@
// license : GNU GPL v2; see accompanying LICENSE file
#ifdef ODB_CXX11
-# include <utility> // std::swap
+# include <utility> // std::swap, std::move
#else
# include <algorithm> // std::swap
#endif
@@ -137,6 +137,19 @@ namespace odb
// vector_base
//
+#ifdef ODB_CXX11
+ inline vector_base::
+ vector_base (vector_base&& x)
+ : impl_ (std::move (x.impl_)), tran_ (0)
+ {
+ if (x.tran_ != 0)
+ {
+ x.tran_->callback_unregister (&x);
+ _arm (*x.tran_);
+ }
+ }
+#endif
+
inline void vector_base::
_arm (transaction& t) const
{