Re: [eigen] patches for EIGEN_STATIC_ASSERT

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


2008/12/18 Kenneth Riddile <kfriddile@xxxxxxxxx>:
> That was actually my first thought, but I couldn't figure out where to put the pragma to make it work transparently.  If someone else with MSVC could try to figure it out that would be nice (make sure you're at warning level 4).   Code like this obviously needs to go somewhere in Eigen:
>
> #ifdef (defined _MSC_VER)
>  #pragma warning( push )
>  #pragma warning( disable: 4127 )
> #endif
>
> // code causing warning goes here
>
> #ifdef (defined _MSC_VER)
>  #pragma warning( pop )
> #endif

Oh, if your only concern was where to put that, it's easy: in the
(few) public headers in Eigen/ (don't enter the src/ directory).

For example we could already test the Core module just by putting your
1st block of code at the beginning of Eigen/Core and the 2nd block of
code at the end of Eigen/Core.

If you open Eigen/Core you'll see that we already disable a couple of
MSVC warnings. That was actually done by the KDE-on-Windows team a
couple of monthes ago. Currently we don't re-enable the warnings on
exit of Eigen which is probably not optimal... would be great if
possible to re-enable them.

If we start doing this for all module we'd probably want to make
macros for that, the problem is that #pragma don't fit into macros, so
I hope that MSVC supports the _Pragma("...") alternative syntax or
something like that.

Cheers,
Benoit

---


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