Re: [eigen] patches for EIGEN_STATIC_ASSERT |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] patches for EIGEN_STATIC_ASSERT
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 18 Dec 2008 17:05:01 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Cn71DeWcMHkckyS7D0PAtEh+PPe1jI8DYJ1UDsLdKFM=; b=YGW7IGs4zBtgNYrF5IiZ5QON4d9DaheVhQdQ3F7AwcShmMhr5772MyHdULN7l62Xg/ 0uMkHVaRm/8B2Gg4f8g7q+Exj6j1lZvgU1G3BbvWL/S08n4kdUuCzSu9lt54lKvVMh05 NbB1xqWAFD1c/rGGm0bBZH5t1esrb1igs/+cU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=b1V3qdv0UMk7NVo0PJh4liQptgLTEIPXisVR4TMSEAWE0OMiSCmc7kKi/Qemo4y676 45cHslo5Fll/KzJoXI9GGwxQOKo1DgYu3sFvs7jALPCzG0Ea2q5LAAjL57V3R43lPtOi peFQQzcWzgp1p2h/ST5Bo/lSqvrmDfbuJUoOw=
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
---