mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 08:50:57 +01:00
fixed_point: Mark std::swap and move constructor as noexcept
These shouldn't throw and can influence how some standard algorithms will work.
This commit is contained in:
parent
2cc9d94060
commit
0cfd90004b
1 changed files with 2 additions and 2 deletions
|
@ -269,7 +269,7 @@ public:
|
|||
public: // constructors
|
||||
FixedPoint() = default;
|
||||
FixedPoint(const FixedPoint&) = default;
|
||||
FixedPoint(FixedPoint&&) = default;
|
||||
FixedPoint(FixedPoint&&) noexcept = default;
|
||||
FixedPoint& operator=(const FixedPoint&) = default;
|
||||
|
||||
template <IsArithmetic Number>
|
||||
|
@ -454,7 +454,7 @@ public: // conversion to basic types
|
|||
}
|
||||
|
||||
public:
|
||||
constexpr void swap(FixedPoint& rhs) {
|
||||
constexpr void swap(FixedPoint& rhs) noexcept {
|
||||
using std::swap;
|
||||
swap(data_, rhs.data_);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue