Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
eigen
eigen
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 594
    • Issues 594
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Custom Issue Tracker
    • Custom Issue Tracker
  • Merge requests 19
    • Merge requests 19
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libeigen
  • eigeneigen
  • Issues
  • #1764

Closed
Open
Created Dec 04, 2019 by Eigen Bugzilla@eigenbzMaintainer

Use builtin C++ feature tests to check availability of language features

Submitted by Christoph Hertzberg @chhtz

Assigned to Nobody

Link to original bugzilla bug (#1764)
Version: 3.5 (future version)

Description

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?  
#ifndef EIGEN_HAS_VARIADIC_TEMPLATES  
  #if EIGEN_MAX_CPP_VER>=11 && defined(__cpp_variadic_templates)  
    #define EIGEN_HAS_VARIADIC_TEMPLATES __cpp_variadic_templates  
  #else  
    #define EIGEN_HAS_VARIADIC_TEMPLATES 0  
  #endif  
#endif  

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.

https://en.cppreference.com/w/cpp/feature_test

Blocking

#1683 (closed)

Edited Dec 05, 2019 by Eigen Bugzilla
Assignee
Assign to
3.5
Milestone
3.5
Assign milestone
Time tracking
None
Due date
None