This bugzilla service is closed. All entries have been migrated to
Bug 1764 - Use builtin C++ feature tests to check availability of language features
Summary: Use builtin C++ feature tests to check availability of language features
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.5 (future version)
Hardware: All All
: Low Internal Design
Assignee: Nobody
Depends on:
Blocks: 3.5
  Show dependency treegraph
Reported: 2019-10-30 15:01 UTC by Christoph Hertzberg
Modified: 2019-12-04 18:52 UTC (History)
3 users (show)


Description Christoph Hertzberg 2019-10-30 15:01:01 UTC
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

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.
Comment 1 Gael Guennebaud 2019-11-14 16:59:52 UTC
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.
Comment 2 Nobody 2019-12-04 18:52:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to'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:

Note You need to log in before you can comment on or make changes to this bug.