This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 1583

Summary: Requiring C++14 for setting EIGEN_HAS_CONSTEXPR is too strict
Product: Eigen Reporter: Rasmus Munk Larsen <rmlarsen>
Component: Core - expression templatesAssignee: Nobody <eigen.nobody>
Status: NEW ---    
Severity: Compilation Problem CC: benoit.steiner.goog, chtz, gael.guennebaud, jacob.benoit.1, rmlarsen
Priority: Normal    
Version: 3.4 (development)   
Hardware: All   
OS: All   
Whiteboard:

Description Rasmus Munk Larsen 2018-08-06 23:25:24 UTC
The commit:

https://bitbucket.org/eigen/eigen/commits/546e45a188c9d4d130316489dde4797145287cbb

changed the definition of EIGEN_HAS_CONSTEXPR such that it is only set for C++14 compilers. This is needlessly strict and breaks the IndexLists mechanism used to infer tensor shapes and sizes at compile time in TensorFlow.

It also breaks certain legacy builds internal to Google that rely on IndexList.
Comment 1 Rasmus Munk Larsen 2018-08-06 23:42:40 UTC
I meant to say that it "disables the IndexLists mechanism", i.e. 

https://bitbucket.org/eigen/eigen/src/e2ea08bbbe573237b3d196e07ad307eef26aaf7a/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h#lines-14
Comment 2 Rasmus Munk Larsen 2018-08-15 23:13:19 UTC
Friendly ping. Can we revert this particular part of the change?
Comment 3 Gael Guennebaud 2018-08-16 12:09:57 UTC
hm, I don't see how this commit change anything regarding EIGEN_HAS_CONSTEXPR. AFAIK we always required c++14 to enable EIGEN_HAS_CONSTEXPR.

I added Benoit Steiner in CC as I think its him who first introduced EIGEN_HAS_CONSTEXPR.
Comment 4 Gael Guennebaud 2018-08-16 12:13:46 UTC
Maybe we should define two variants to handle cases for which relaxed constexpr is not required?

EIGEN_HAS_CXX11_CONSTEXPR
EIGEN_HAS_CXX14_CONSTEXPR
Comment 5 Rasmus Munk Larsen 2018-08-16 16:24:45 UTC
Yes, having two levels of support would be my preference too.
Comment 6 Nobody 2019-12-04 17:51:11 UTC
-- 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/1583.