A lot of the relatively complicated feature detection code could be simplified by using built-in feature-tests of C++, e.g.,
// Does the compiler support variadic templates?
#if EIGEN_MAX_CPP_VER>=11 && defined(__cpp_variadic_templates)
#define EIGEN_HAS_VARIADIC_TEMPLATES __cpp_variadic_templates
#define EIGEN_HAS_VARIADIC_TEMPLATES 0
This needs to be tested with older compiler however, and we either need to still add some extra tests, or just un-support compilers which do not support these feature-tests.
I would not bother until we're done with 3.4 and start 3.5 with an increased minimal c++ version (c++11 or c++14). Such an increase in the minimal c++11 version will allow us to cleanup most of those checks anyway, and then, yes, we should use __cpp_* for c++17/20 features.
-- GitLab Migration Automatic Message --
This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1764.