aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/plugins
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-02-11 10:28:44 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-02-11 10:28:44 +0100
commit4a4a72951fc6175e7e5ee3bcdc96a2c8b7160e68 (patch)
tree4b6459e29b12b95c2451f3c659076e91999c6a0b /Eigen/src/plugins
parent1ef30b8090ad56bac5d1b0553a2b0a894a77405e (diff)
Fix previous commits: disbale only problematic indexed view methods for old compilers instead of disabling everything.
Tested with gcc 4.7 (c++03) and gcc 4.8 (c++03 & c++11)
Diffstat (limited to 'Eigen/src/plugins')
-rw-r--r--Eigen/src/plugins/IndexedViewMethods.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Eigen/src/plugins/IndexedViewMethods.h b/Eigen/src/plugins/IndexedViewMethods.h
index 81e463623..22c1666c5 100644
--- a/Eigen/src/plugins/IndexedViewMethods.h
+++ b/Eigen/src/plugins/IndexedViewMethods.h
@@ -7,7 +7,6 @@
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#if EIGEN_HAS_INDEXED_VIEW
#if !defined(EIGEN_PARSED_BY_DOXYGEN)
// This file is automatically included twice to generate const and non-const versions
@@ -113,6 +112,8 @@ operator()(const RowIndices& rowIndices, const ColIndices& colIndices) EIGEN_IND
return Base::operator()(internal::eval_expr_given_size(rowIndices,rows()),internal::eval_expr_given_size(colIndices,cols()));
}
+#if EIGEN_HAS_STATIC_ARRAY_TEMPLATE
+
// The folowing three overloads are needed to handle raw Index[N] arrays.
template<typename RowIndicesT, std::size_t RowIndicesN, typename ColIndices>
@@ -139,6 +140,8 @@ operator()(const RowIndicesT (&rowIndices)[RowIndicesN], const ColIndicesT (&col
(derived(), rowIndices, colIndices);
}
+#endif // EIGEN_HAS_STATIC_ARRAY_TEMPLATE
+
// Overloads for 1D vectors/arrays
template<typename Indices>
@@ -182,6 +185,8 @@ operator()(const IndexType& id) EIGEN_INDEXED_VIEW_METHOD_CONST
return Base::operator()(internal::eval_expr_given_size(id,size()));
}
+#if EIGEN_HAS_STATIC_ARRAY_TEMPLATE
+
template<typename IndicesT, std::size_t IndicesN>
typename internal::enable_if<IsRowMajor,
IndexedView<EIGEN_INDEXED_VIEW_METHOD_CONST Derived,IvcIndex,const IndicesT (&)[IndicesN]> >::type
@@ -202,6 +207,8 @@ operator()(const IndicesT (&indices)[IndicesN]) EIGEN_INDEXED_VIEW_METHOD_CONST
(derived(), indices, IvcIndex(0));
}
+#endif // EIGEN_HAS_STATIC_ARRAY_TEMPLATE
+
#undef EIGEN_INDEXED_VIEW_METHOD_CONST
#undef EIGEN_INDEXED_VIEW_METHOD_TYPE
@@ -258,4 +265,3 @@ IndexedView_or_VectorBlock
operator()(const Indices& indices);
#endif // EIGEN_PARSED_BY_DOXYGEN
-#endif // EIGEN_HAS_INDEXED_VIEW