From cd8f527850321439be3ccc557f28323a5a00bee3 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 7 Sep 2022 20:06:42 +0300 Subject: Add noexcept to move constructors --- libbutl/optional.hxx | 4 ++-- 1 file 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::value) = default; #else optional (const optional&) = default; - optional (optional&&) = default; + optional (optional&&) noexcept (is_nothrow_constructible::value) = default; #endif optional& operator= (nullopt_t v) {static_cast (*this) = v; return *this;} -- cgit v1.1