aboutsummaryrefslogtreecommitdiff
path: root/odb/vector.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-12-14 19:36:20 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-12-15 10:44:53 +0300
commit5fef9aadd206dce1d0faa984e66a0c3eb12154dd (patch)
tree4fad170647d74e0a590e640b2d47c0782f3a0b26 /odb/vector.hxx
parent3891eb7aed225ac9f2961c953634682af6f57906 (diff)
Add noexcept to move constructors and move assignment operators
Diffstat (limited to 'odb/vector.hxx')
-rw-r--r--odb/vector.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/odb/vector.hxx b/odb/vector.hxx
index ac75ef1..3fe7d8a 100644
--- a/odb/vector.hxx
+++ b/odb/vector.hxx
@@ -91,10 +91,16 @@ namespace odb
{return v_.get_allocator ();}
#ifdef ODB_CXX11
- vector(vector&& x): vector_base (std::move (x)), v_ (std::move (x.v_)) {}
+ vector(vector&& x) noexcept
+ : vector_base (std::move (x)), v_ (std::move (x.v_)) {}
+
vector(const vector& x, const A& a): vector_base (x), v_ (x.v_, a) {}
vector(vector&& x, const A& a)
: vector_base (std::move (x)), v_ (std::move (x.v_), a) {}
+
+ // Note: noexcept is not specified since it can throw while reallocating
+ // impl_.
+ //
vector& operator=(vector&&);
#ifdef ODB_CXX11_INITIALIZER_LIST
vector(std::initializer_list<T> il, const A& a = A()): v_ (il, a) {}