[no subject]

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


And, since Eigen is such a low level library, there is significant risk
that you could put projects in an impossible situation; e.g. if Ceres were
to switch to using C++11-required Eigen features, then suddenly Ceres would
also be frozen in Blender (since Blender relies on Ceres). Due to Eigen's
popularity in numeric libraries, this issue is magnified.


On Wed, Oct 30, 2013 at 8:39 PM, Rhys Ulerich <rhys.ulerich@xxxxxxxxx>wrote:

> > 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
> > consider.
>
> I do like this notion as often compilers support a good chunk of C++11
> but don't advertise it in __cplusplus.  So, maybe,
>   #if __cplusplus >= 201103L || defined(EIGEN_ENABLE_CXX11)
>   # ifndef EIGEN_ENABLE_CXX11
>   #   define EIGEN_ENABLE_CXX11
>   # endif
>   #endif
> whereafter guards in Eigen or application code use #ifdef
> EIGEN_ENABLE_CXX11 for features requiring the newer language.
>
> That lets (a) C++11 stuff just work under new-enough compilers and (b)
> folks with older compiler who swear they're okay can #define
> EIGEN_ENABLE_CXX11 themselves at their own risk.
>
> - Rhys
>
>
>

--047d7bd6b048a8c42104e9fb10ba
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">From the peanut gallery, I&#39;d like to throw in that per=
sonally, as much as I would love to use C++11, it isn&#39;t a realistic cho=
ice for many projects. Especially in the embedded world, or on Windows for =
people stuck on older versions of MSVC. I think if Eigen goes in a directio=
n where C++11 is required or important functionality is only accessible wit=
h C++11 will result in a balkanized Eigen community, with many people stuck=
 on older versions (since they can&#39;t upgrade). For example, Blender on =
Windows needs to compile with MSVC 2010 (IIRC) and so requiring C++11 would=
 immediately freeze Eigen on Blender.<div>
<br></div><div>And, since Eigen is such a low level library, there is signi=
ficant risk that you could put projects in an impossible situation; e.g. if=
 Ceres were to switch to using C++11-required Eigen features, then suddenly=
 Ceres would also be frozen in Blender (since Blender relies on Ceres). Due=
 to Eigen&#39;s popularity in numeric libraries, this issue is magnified.</=
div>
</div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Wed,=
 Oct 30, 2013 at 8:39 PM, Rhys Ulerich <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:rhys.ulerich@xxxxxxxxx" target=3D"_blank">rhys.ulerich@xxxxxxxxx</a>&gt=
;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div class=3D"im">&gt; Actually, this is one=
 of the reasons I suggested using a #define to<br>
&gt; enable Eigen&#39;s C++11 features. =A0If one must manually define<br>
&gt; EIGEN_ENABLE_CXX11, it will remove the risk that a project begins usin=
g<br>
&gt; C++11 features without realizing it.<br>
&gt;<br>
&gt; Another issue is that some compiler versions claim to support C++11<br=
>
&gt; through their __cplusplus macro, but do not support all C++11 features=
..<br>
&gt; =A0I&#39;m sure you can find ways to deal with this, but it is somethi=
ng to<br>
&gt; consider.<br>
<br>
</div>I do like this notion as often compilers support a good chunk of C++1=
1<br>
but don&#39;t advertise it in __cplusplus. =A0So, maybe,<br>
=A0 #if __cplusplus &gt;=3D 201103L || defined(EIGEN_ENABLE_CXX11)<br>
=A0 # ifndef EIGEN_ENABLE_CXX11<br>
=A0 # =A0 define EIGEN_ENABLE_CXX11<br>
=A0 # endif<br>
=A0 #endif<br>
whereafter guards in Eigen or application code use #ifdef<br>
EIGEN_ENABLE_CXX11 for features requiring the newer language.<br>
<br>
That lets (a) C++11 stuff just work under new-enough compilers and (b)<br>
folks with older compiler who swear they&#39;re okay can #define<br>
EIGEN_ENABLE_CXX11 themselves at their own risk.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
- Rhys<br>
<br>
<br>
</font></span></blockquote></div><br></div>

--047d7bd6b048a8c42104e9fb10ba--



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/