diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-05-20 14:54:20 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-05-20 14:54:20 +0200 |
commit | 48bf5ec2164974c88935148aa1dff09a41d532b2 (patch) | |
tree | 5dd972cc4785fc10508af318412db185a2b133d7 /Eigen/src | |
parent | f43ae88892be4dddf895043d2c51ef354a404a00 (diff) |
Make EIGEN_HAS_RVALUE_REFERENCES user configurable
Diffstat (limited to 'Eigen/src')
-rw-r--r-- | Eigen/src/Core/Array.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/DenseStorage.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/Matrix.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 6 |
5 files changed, 11 insertions, 7 deletions
diff --git a/Eigen/src/Core/Array.h b/Eigen/src/Core/Array.h index f296dd495..c0af4aa9d 100644 --- a/Eigen/src/Core/Array.h +++ b/Eigen/src/Core/Array.h @@ -147,7 +147,7 @@ class Array } #endif -#ifdef EIGEN_HAS_RVALUE_REFERENCES +#if EIGEN_HAS_RVALUE_REFERENCES EIGEN_DEVICE_FUNC Array(Array&& other) : Base(std::move(other)) diff --git a/Eigen/src/Core/DenseStorage.h b/Eigen/src/Core/DenseStorage.h index cf55b6b35..4c0afdc7a 100644 --- a/Eigen/src/Core/DenseStorage.h +++ b/Eigen/src/Core/DenseStorage.h @@ -362,7 +362,7 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam } return *this; } -#ifdef EIGEN_HAS_RVALUE_REFERENCES +#if EIGEN_HAS_RVALUE_REFERENCES EIGEN_DEVICE_FUNC DenseStorage(DenseStorage&& other) : m_data(std::move(other.m_data)) @@ -441,7 +441,7 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro } return *this; } -#ifdef EIGEN_HAS_RVALUE_REFERENCES +#if EIGEN_HAS_RVALUE_REFERENCES EIGEN_DEVICE_FUNC DenseStorage(DenseStorage&& other) : m_data(std::move(other.m_data)) @@ -514,7 +514,7 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dyn } return *this; } -#ifdef EIGEN_HAS_RVALUE_REFERENCES +#if EIGEN_HAS_RVALUE_REFERENCES EIGEN_DEVICE_FUNC DenseStorage(DenseStorage&& other) : m_data(std::move(other.m_data)) diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index f053f759d..ac40c82f0 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -268,7 +268,7 @@ class Matrix : Base(internal::constructor_without_unaligned_array_assert()) { Base::_check_template_params(); EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED } -#ifdef EIGEN_HAS_RVALUE_REFERENCES +#if EIGEN_HAS_RVALUE_REFERENCES EIGEN_DEVICE_FUNC Matrix(Matrix&& other) : Base(std::move(other)) diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index d929cc4aa..f2e14400f 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -471,7 +471,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type } #endif -#ifdef EIGEN_HAS_RVALUE_REFERENCES +#if EIGEN_HAS_RVALUE_REFERENCES EIGEN_DEVICE_FUNC PlainObjectBase(PlainObjectBase&& other) : m_storage( std::move(other.m_storage) ) diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 4fe0dde8f..7fb194a40 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -348,11 +348,15 @@ #endif // Do we support r-value references? +#ifndef EIGEN_HAS_RVALUE_REFERENCES #if EIGEN_MAX_CPP_VER>=11 && \ (__has_feature(cxx_rvalue_references) || \ (defined(__cplusplus) && __cplusplus >= 201103L) || \ (EIGEN_COMP_MSVC >= 1600)) - #define EIGEN_HAS_RVALUE_REFERENCES + #define EIGEN_HAS_RVALUE_REFERENCES 1 +#else + #define EIGEN_HAS_RVALUE_REFERENCES 0 +#endif #endif // Does the compiler support C99? |