diff options
-rw-r--r-- | odb/vector-impl.ixx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/odb/vector-impl.ixx b/odb/vector-impl.ixx index 1c0ee90..21999d5 100644 --- a/odb/vector-impl.ixx +++ b/odb/vector-impl.ixx @@ -18,6 +18,16 @@ namespace odb { } + inline void vector_impl:: + swap (vector_impl& x) + { + std::swap (state_, x.state_); + std::swap (size_, x.size_); + std::swap (tail_, x.tail_); + std::swap (capacity_, x.capacity_); + std::swap (data_, x.data_); + } + #ifdef ODB_CXX11 inline vector_impl:: vector_impl (vector_impl&& x) noexcept @@ -36,16 +46,6 @@ namespace odb } inline void vector_impl:: - swap (vector_impl& x) - { - std::swap (state_, x.state_); - std::swap (size_, x.size_); - std::swap (tail_, x.tail_); - std::swap (capacity_, x.capacity_); - std::swap (data_, x.data_); - } - - inline void vector_impl:: reserve (std::size_t n) { if (n > capacity_) @@ -146,6 +146,17 @@ namespace odb inline vector_base:: vector_base (): tran_ (0) {} + inline void vector_base:: + _arm (transaction& t) const + { + tran_ = &t; + t.callback_register (&rollback, + const_cast<vector_base*> (this), + transaction::event_rollback, + 0, + &tran_); + } + inline vector_base:: vector_base (const vector_base& x) : impl_ (x.impl_), tran_ (0) @@ -196,15 +207,4 @@ namespace odb { return impl_.tracking (); } - - inline void vector_base:: - _arm (transaction& t) const - { - tran_ = &t; - t.callback_register (&rollback, - const_cast<vector_base*> (this), - transaction::event_rollback, - 0, - &tran_); - } } |