Make move constructor/assignment noexcept

This commit is contained in:
Boris Kolpackov
2023-06-06 11:20:29 +02:00
parent 34ffd89103
commit 8677816283
3 changed files with 6 additions and 4 deletions

2
NEWS
View File

@@ -1,5 +1,7 @@
Version 1.0.7
* Make move constructor/assignment noexcept.
* Use snprintf() instead of sprintf() to avoid warnings.
Version 1.0.6

View File

@@ -155,10 +155,10 @@ namespace stud
void
swap (uuid&);
uuid (uuid&&);
uuid (uuid&&) noexcept;
uuid (const uuid&) = default;
uuid& operator= (uuid&&);
uuid& operator= (uuid&&) noexcept;
uuid& operator= (const uuid&) = default;
};

View File

@@ -36,14 +36,14 @@ namespace stud
}
inline uuid::
uuid (uuid&& u)
uuid (uuid&& u) noexcept
: uuid () // nil
{
swap (u);
}
inline uuid& uuid::
operator= (uuid&& u)
operator= (uuid&& u) noexcept
{
if (this != &u)
{