bug #725: make move ctor/assignment noexcept.

This commit is contained in:
Gael Guennebaud
2016-06-03 14:28:25 +02:00
parent e8b922ca63
commit 8d97ba6b22
5 changed files with 23 additions and 11 deletions

View File

@@ -270,7 +270,7 @@ class Matrix
#if EIGEN_HAS_RVALUE_REFERENCES
EIGEN_DEVICE_FUNC
Matrix(Matrix&& other)
Matrix(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible<Scalar>::value)
: Base(std::move(other))
{
Base::_check_template_params();
@@ -278,7 +278,7 @@ class Matrix
Base::_set_noalias(other);
}
EIGEN_DEVICE_FUNC
Matrix& operator=(Matrix&& other)
Matrix& operator=(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable<Scalar>::value)
{
other.swap(*this);
return *this;