--- a/Eigen/Core Fri Jan 10 11:02:11 2014 +0100 +++ a/Eigen/Core Fri Jan 10 11:52:07 2014 +0100 @@ -187,6 +187,11 @@ // for min/max: #include +// for std::is_nothrow_move_assignable +#ifdef EIGEN_INCLUDE_TYPE_TRAITS +#include +#endif + // for outputting debug info #ifdef EIGEN_DEBUG_ASSIGN #include --- a/Eigen/src/Core/Array.h Fri Jan 10 11:02:11 2014 +0100 +++ a/Eigen/src/Core/Array.h Fri Jan 10 11:52:07 2014 +0100 @@ -130,14 +130,14 @@ #endif #ifdef EIGEN_HAVE_RVALUE_REFERENCES - Array(Array&& other) + Array(Array&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable::value) : Base(std::move(other)) { Base::_check_template_params(); if (RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic) Base::_set_noalias(other); } - Array& operator=(Array&& other) + Array& operator=(Array&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable::value) { other.swap(*this); return *this; --- a/Eigen/src/Core/DenseStorage.h Fri Jan 10 11:02:11 2014 +0100 +++ a/Eigen/src/Core/DenseStorage.h Fri Jan 10 11:52:07 2014 +0100 @@ -298,14 +298,14 @@ return *this; } #ifdef EIGEN_HAVE_RVALUE_REFERENCES - DenseStorage(DenseStorage&& other) + DenseStorage(DenseStorage&& other) EIGEN_NOEXCEPT : m_data(std::move(other.m_data)) , m_rows(std::move(other.m_rows)) , m_cols(std::move(other.m_cols)) { other.m_data = nullptr; } - DenseStorage& operator=(DenseStorage&& other) + DenseStorage& operator=(DenseStorage&& other) EIGEN_NOEXCEPT { using std::swap; swap(m_data, other.m_data); @@ -369,13 +369,13 @@ return *this; } #ifdef EIGEN_HAVE_RVALUE_REFERENCES - DenseStorage(DenseStorage&& other) + DenseStorage(DenseStorage&& other) EIGEN_NOEXCEPT : m_data(std::move(other.m_data)) , m_cols(std::move(other.m_cols)) { other.m_data = nullptr; } - DenseStorage& operator=(DenseStorage&& other) + DenseStorage& operator=(DenseStorage&& other) EIGEN_NOEXCEPT { using std::swap; swap(m_data, other.m_data); @@ -435,13 +435,13 @@ return *this; } #ifdef EIGEN_HAVE_RVALUE_REFERENCES - DenseStorage(DenseStorage&& other) + DenseStorage(DenseStorage&& other) EIGEN_NOEXCEPT : m_data(std::move(other.m_data)) , m_rows(std::move(other.m_rows)) { other.m_data = nullptr; } - DenseStorage& operator=(DenseStorage&& other) + DenseStorage& operator=(DenseStorage&& other) EIGEN_NOEXCEPT { using std::swap; swap(m_data, other.m_data); --- a/Eigen/src/Core/Matrix.h Fri Jan 10 11:02:11 2014 +0100 +++ a/Eigen/src/Core/Matrix.h Fri Jan 10 11:52:07 2014 +0100 @@ -218,14 +218,14 @@ { Base::_check_template_params(); EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED } #ifdef EIGEN_HAVE_RVALUE_REFERENCES - Matrix(Matrix&& other) + Matrix(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable::value) : Base(std::move(other)) { Base::_check_template_params(); if (RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic) Base::_set_noalias(other); } - Matrix& operator=(Matrix&& other) + Matrix& operator=(Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable::value) { other.swap(*this); return *this; --- a/Eigen/src/Core/PlainObjectBase.h Fri Jan 10 11:02:11 2014 +0100 +++ a/Eigen/src/Core/PlainObjectBase.h Fri Jan 10 11:52:07 2014 +0100 @@ -466,13 +466,13 @@ #ifdef EIGEN_HAVE_RVALUE_REFERENCES EIGEN_DEVICE_FUNC - PlainObjectBase(PlainObjectBase&& other) + PlainObjectBase(PlainObjectBase&& other) EIGEN_NOEXCEPT : m_storage( std::move(other.m_storage) ) { } EIGEN_DEVICE_FUNC - PlainObjectBase& operator=(PlainObjectBase&& other) + PlainObjectBase& operator=(PlainObjectBase&& other) EIGEN_NOEXCEPT { using std::swap; swap(m_storage, other.m_storage); --- a/Eigen/src/Core/util/Macros.h Fri Jan 10 11:02:11 2014 +0100 +++ a/Eigen/src/Core/util/Macros.h Fri Jan 10 11:52:07 2014 +0100 @@ -110,6 +110,24 @@ #define EIGEN_HAVE_RVALUE_REFERENCES #endif +// Is noexcept supported? +#if (__has_feature(cxx_noexcept) || \ + (EIGEN_GNUC_AT_LEAST(4,6) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \ + (defined(_MSC_VER) && _MSC_VER >= 1900)) + // full support + #define EIGEN_INCLUDE_TYPE_TRAITS + #define EIGEN_NOEXCEPT noexcept + #define EIGEN_NOEXCEPT_IF(x) noexcept(x) +#elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 180021114) + // MSVC Nov 2013 CTP, supports unconditional noexcept only + #define EIGEN_NOEXCEPT noexcept + #define EIGEN_NOEXCEPT_IF(x) +#else + // no support + #define EIGEN_NOEXCEPT + #define EIGEN_NOEXCEPT_IF(x) +#endif + /** Allows to disable some optimizations which might affect the accuracy of the result. * Such optimization are enabled by default, and set EIGEN_FAST_MATH to 0 to disable them. * They currently include: