mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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
This commit is contained in:
@@ -349,6 +349,12 @@
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#if !( EIGEN_COMP_CLANG && ((EIGEN_COMP_CLANG<309) || defined(__apple_build_version__)) || EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC<49)
|
||||
#define EIGEN_HAS_INDEXED_VIEW 1
|
||||
#else
|
||||
#define EIGEN_HAS_INDEXED_VIEW 0
|
||||
#endif
|
||||
|
||||
// Upperbound on the C++ version to use.
|
||||
// Expected values are 03, 11, 14, 17, etc.
|
||||
// By default, let's use an arbitrarily large C++ version.
|
||||
|
||||
Reference in New Issue
Block a user