mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
remove EIGEN_REF_TO_TEMPORARY, clarify docs
This commit is contained in:
@@ -230,7 +230,7 @@ class Array
|
||||
* data pointers.
|
||||
*/
|
||||
template<typename OtherDerived>
|
||||
void swap(ArrayBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other)
|
||||
void swap(ArrayBase<OtherDerived> const & other)
|
||||
{ this->_swap(other.derived()); }
|
||||
|
||||
inline Index innerStride() const { return 1; }
|
||||
|
||||
@@ -323,7 +323,7 @@ class Matrix
|
||||
* of same type it is enough to swap the data pointers.
|
||||
*/
|
||||
template<typename OtherDerived>
|
||||
void swap(MatrixBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other)
|
||||
void swap(MatrixBase<OtherDerived> const & other)
|
||||
{ this->_swap(other.derived()); }
|
||||
|
||||
inline Index innerStride() const { return 1; }
|
||||
|
||||
@@ -526,7 +526,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
* data pointers.
|
||||
*/
|
||||
template<typename OtherDerived>
|
||||
void _swap(DenseBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other)
|
||||
void _swap(DenseBase<OtherDerived> const & other)
|
||||
{
|
||||
enum { SwapPointers = internal::is_same<Derived, OtherDerived>::value && Base::SizeAtCompileTime==Dynamic };
|
||||
internal::matrix_swap_impl<Derived, OtherDerived, bool(SwapPointers)>::run(this->derived(), other.const_cast_derived());
|
||||
|
||||
@@ -324,13 +324,13 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
||||
}
|
||||
|
||||
template<typename OtherDerived>
|
||||
void swap(TriangularBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other)
|
||||
void swap(TriangularBase<OtherDerived> const & other)
|
||||
{
|
||||
TriangularView<SwapWrapper<MatrixType>,Mode>(const_cast<MatrixType&>(m_matrix)).lazyAssign(other.derived());
|
||||
}
|
||||
|
||||
template<typename OtherDerived>
|
||||
void swap(MatrixBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other)
|
||||
void swap(MatrixBase<OtherDerived> const & other)
|
||||
{
|
||||
TriangularView<SwapWrapper<MatrixType>,Mode>(const_cast<MatrixType&>(m_matrix)).lazyAssign(other.derived());
|
||||
}
|
||||
|
||||
@@ -263,13 +263,6 @@
|
||||
// needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.
|
||||
#define EIGEN_DOCS_IO_FORMAT IOFormat(3, 0, " ", "\n", "", "")
|
||||
|
||||
// C++0x features
|
||||
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
|
||||
#define EIGEN_REF_TO_TEMPORARY const &
|
||||
#else
|
||||
#define EIGEN_REF_TO_TEMPORARY const &
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (!defined(__INTEL_COMPILER))
|
||||
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
|
||||
using Base::operator =;
|
||||
|
||||
@@ -573,7 +573,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
|
||||
{ return typename internal::eval<Derived>::type(derived()); }
|
||||
|
||||
// template<typename OtherDerived>
|
||||
// void swap(MatrixBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other);
|
||||
// void swap(MatrixBase<OtherDerived> const & other);
|
||||
|
||||
// template<unsigned int Added>
|
||||
// const SparseFlagged<Derived, Added, 0> marked() const;
|
||||
|
||||
Reference in New Issue
Block a user