Add noexcept

This commit is contained in:
Alexander Karzhenkov 2023-01-08 11:55:55 +05:00
parent adf7e039cb
commit 24f2ce74a0
2 changed files with 10 additions and 10 deletions

View File

@ -71,17 +71,17 @@ class optional
public: public:
base_type& base() & base_type& base() & noexcept
{ {
return base_value; return base_value;
} }
const base_type& base() const & const base_type& base() const & noexcept
{ {
return base_value; return base_value;
} }
base_type&& base() && base_type&& base() && noexcept
{ {
return std::move(base_value); return std::move(base_value);
} }
@ -150,8 +150,8 @@ class optional
constexpr T* operator ->() noexcept { return base_value.operator ->(); } constexpr T* operator ->() noexcept { return base_value.operator ->(); }
constexpr const T* operator ->() const noexcept { return base_value.operator ->(); } constexpr const T* operator ->() const noexcept { return base_value.operator ->(); }
operator base_type& () & { return base_value; } operator base_type& () & noexcept { return base_value; }
operator base_type&& () && { return std::move(base_value); } operator base_type&& () && noexcept { return std::move(base_value); }
// *INDENT-ON* // *INDENT-ON*
}; };

View File

@ -4663,17 +4663,17 @@ class optional
public: public:
base_type& base() & base_type& base() & noexcept
{ {
return base_value; return base_value;
} }
const base_type& base() const & const base_type& base() const & noexcept
{ {
return base_value; return base_value;
} }
base_type&& base() && base_type&& base() && noexcept
{ {
return std::move(base_value); return std::move(base_value);
} }
@ -4742,8 +4742,8 @@ class optional
constexpr T* operator ->() noexcept { return base_value.operator ->(); } constexpr T* operator ->() noexcept { return base_value.operator ->(); }
constexpr const T* operator ->() const noexcept { return base_value.operator ->(); } constexpr const T* operator ->() const noexcept { return base_value.operator ->(); }
operator base_type& () & { return base_value; } operator base_type& () & noexcept { return base_value; }
operator base_type&& () && { return std::move(base_value); } operator base_type&& () && noexcept { return std::move(base_value); }
// *INDENT-ON* // *INDENT-ON*
}; };