mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-19 16:19:37 +08:00
Make EIGEN_HAS_RVALUE_REFERENCES user configurable
This commit is contained in:
parent
f43ae88892
commit
48bf5ec216
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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) )
|
||||
|
@ -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?
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <Eigen/Core>
|
||||
|
||||
#ifdef EIGEN_HAS_RVALUE_REFERENCES
|
||||
#if EIGEN_HAS_RVALUE_REFERENCES
|
||||
template <typename MatrixType>
|
||||
void rvalue_copyassign(const MatrixType& m)
|
||||
{
|
||||
|
@ -309,7 +309,7 @@ class TensorFixedSize : public TensorBase<TensorFixedSize<Scalar_, Dimensions_,
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef EIGEN_HAS_RVALUE_REFERENCES
|
||||
#if EIGEN_HAS_RVALUE_REFERENCES
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize(Self&& other)
|
||||
: m_storage(other.m_storage)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user