diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-12-09 20:00:08 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-12-13 14:50:13 +0300 |
commit | c6c224a78715d5e2c532fe318325fbca8e70e701 (patch) | |
tree | dc755313aa482f62ebac15ade66c41a24e908d86 /libbutl/optional.ixx | |
parent | 8cc86445437e7afc583dee18b36c0e8ba4b6fe12 (diff) |
Add noexcept to move constructors and move assignment operators
Diffstat (limited to 'libbutl/optional.ixx')
-rw-r--r-- | libbutl/optional.ixx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libbutl/optional.ixx b/libbutl/optional.ixx index e2b552f..fdd0ac5 100644 --- a/libbutl/optional.ixx +++ b/libbutl/optional.ixx @@ -77,6 +77,9 @@ namespace butl template <typename T> inline optional_data<T, false>& optional_data<T, false>:: operator= (optional_data&& o) + noexcept (std::is_nothrow_move_constructible<T>::value && + std::is_nothrow_move_assignable<T>::value && + std::is_nothrow_destructible<T>::value) { if (o.v_) { @@ -171,6 +174,8 @@ namespace butl template <typename T> inline optional_data<T, true>& optional_data<T, true>:: operator= (optional_data&& o) + noexcept (std::is_nothrow_move_constructible<T>::value && + std::is_nothrow_move_assignable<T>::value) { if (o.v_) { |