Make Arrays's ctor/assignment noexcept

This commit is contained in:
Gael Guennebaud 2016-06-09 22:52:37 +02:00
parent 37638dafd7
commit 1fc2746417

View File

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