From 4a4a72951fc6175e7e5ee3bcdc96a2c8b7160e68 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sat, 11 Feb 2017 10:28:44 +0100 Subject: 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) --- Eigen/src/plugins/IndexedViewMethods.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Eigen/src/plugins') 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 @@ -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 @@ -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 internal::enable_if >::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 -- cgit v1.2.3