Re: [eigen] Initial implementation of tensor support

[ Thread Index | Date Index | More Archives ]

On 10/30/2013 03:20 AM, Christoph Hertzberg wrote:
> On 30.10.2013 04:42, Jim Garrison wrote:
>> I have searched the mailing list archives for mentions of including
>> C++11 code in Eigen and have been unable to find anything.  I personally
> See e.g. the thread starting here:
> Here is the corresponding commit (move support):

Oh yes, I now recall having seen this thread.

>> think that one should be able to #define something which enables
>> optional C++11 features of Eigen.  (Such features should be coded in
> I agree. Something like this would do:
> #if (__cplusplus >= 201103L)
> #  define EIGEN_ENABLE_CXX11
> #endif
>> C++11 *only* if C++11 is necessary for their implementation, or if it
>> greatly reduces code duplication/complexity.)  Off the top of my head
>> these features could include:
> Generally, I agree that we should use more C++11 features in the future.
> It does however bear the risk that projects using those features
> immediately lose compatibility to older compilers (which unfortunately
> are still common e.g. for embedded systems) -- that's especially the
> case if we introduce new core functionality depending on C++11.

Actually, this is one of the reasons I suggested using a #define to
enable Eigen's C++11 features.  If one must manually define
EIGEN_ENABLE_CXX11, it will remove the risk that a project begins using
C++11 features without realizing it.

Another issue is that some compiler versions claim to support C++11
through their __cplusplus macro, but do not support all C++11 features.
 I'm sure you can find ways to deal with this, but it is something to

Mail converted by MHonArc 2.6.19+