aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/plugins
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2017-02-10 13:08:49 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2017-02-10 13:08:49 -0800
commit8b3cc54c42d6f2cc7db6f2a56da0e6510782b747 (patch)
tree96f56f49a34f7b848d4e053600ac46b5a45fe314 /Eigen/src/plugins
parenta1ff24f96a1280cd7d7395f739d8f265150879bb (diff)
Added a new EIGEN_HAS_INDEXED_VIEW define that set to 0 for older compilers that are known to fail to compile the indexed views (I used the define from the indexed_views.cpp test).
Only include the indexed view methods when the compiler supports the code. This makes it possible to use Eigen again in complex code bases such as TensorFlow and older compilers such as gcc 4.8
Diffstat (limited to 'Eigen/src/plugins')
-rw-r--r--Eigen/src/plugins/IndexedViewMethods.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Eigen/src/plugins/IndexedViewMethods.h b/Eigen/src/plugins/IndexedViewMethods.h
index b2cc2944a..5e28ec71c 100644
--- a/Eigen/src/plugins/IndexedViewMethods.h
+++ b/Eigen/src/plugins/IndexedViewMethods.h
@@ -7,7 +7,7 @@
// 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/.
-#ifndef EIGEN_PARSED_BY_DOXYGEN
+#if !defined(EIGEN_PARSED_BY_DOXYGEN) && EIGEN_HAS_INDEXED_VIEW
// This file is automatically included twice to generate const and non-const versions
@@ -256,5 +256,4 @@ template<typename Indices>
IndexedView_or_VectorBlock
operator()(const Indices& indices);
-#endif // EIGEN_PARSED_BY_DOXYGEN
-
+#endif // EIGEN_PARSED_BY_DOXYGEN && EIGEN_HAS_INDEXED_VIEW