aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-09-07 20:06:42 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-09-07 21:53:42 +0300
commitcd8f527850321439be3ccc557f28323a5a00bee3 (patch)
tree9bc54ac162bf585d6c27e0efece80fa4d74f0f76
parent967d8fcc476c5754bcc365dc6a64e6023f0b8af1 (diff)
Add noexcept to move constructorsnoexcept
-rw-r--r--libbutl/optional.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbutl/optional.hxx b/libbutl/optional.hxx
index 7d66ac5..e30504e 100644
--- a/libbutl/optional.hxx
+++ b/libbutl/optional.hxx
@@ -263,10 +263,10 @@ namespace butl
#if (!defined(_MSC_VER) || _MSC_VER > 1900) && \
(!defined(__GNUC__) || __GNUC__ > 4 || defined(__clang__))
constexpr optional (const optional&) = default;
- constexpr optional (optional&&) = default;
+ constexpr optional (optional&&) noexcept (is_nothrow_constructible<T, T>::value) = default;
#else
optional (const optional&) = default;
- optional (optional&&) = default;
+ optional (optional&&) noexcept (is_nothrow_constructible<T, T>::value) = default;
#endif
optional& operator= (nullopt_t v) {static_cast<base&> (*this) = v; return *this;}