aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/indexed_view.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-10-08 10:43:43 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-10-08 10:43:43 +0200
commitc9643f4a6f6827908f4d351bb8a3f7a0027b3769 (patch)
tree2d5cb77e7e5dcfe869c72f268db6ba7b23742016 /test/indexed_view.cpp
parent774bb9d6f7a33e7d1890dd8e4c7bbe5a2bdbf03e (diff)
Disable C++11 deprecated warning when limiting Eigen to C++98
Diffstat (limited to 'test/indexed_view.cpp')
-rw-r--r--test/indexed_view.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp
index 9a284cf0a..8ede612d1 100644
--- a/test/indexed_view.cpp
+++ b/test/indexed_view.cpp
@@ -15,6 +15,14 @@
#ifdef EIGEN_TEST_PART_3
// Make sure we also check c++98 max implementation
#define EIGEN_MAX_CPP_VER 03
+
+// We need to disable this warning when compiling with c++11 while limiting Eigen to c++98
+// Ideally we would rather configure the compiler to build in c++98 mode but this needs
+// to be done at the CMakeLists.txt level.
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
+ #pragma GCC diagnostic ignored "-Wdeprecated"
+#endif
+
#endif
#include <valarray>