Re: [eigen] CoeffReturnType causing lots of warning on vs2008

[ Thread Index | Date Index | More Archives ]

I figured it was something trivial like that, just didn't have the time to look into it.  Anyways, I've committed the fix.  I was also about to mention Boost.mpl after noticing ei_meta_if, but then I saw your nice comment in Meta.h, so I'm assuming that's been brought up before :)  FWIW, I've seen Eigen brought up favorably a few times on the Boost lists.  Also, I may be able to report on Eigen's compatability with a couple embedded ARMv6 platforms shortly.

--- On Fri, 4/3/09, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:

From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
Subject: Re: [eigen] CoeffReturnType causing lots of warning on vs2008
To: eigen@xxxxxxxxxxxxxxxxxxx
Date: Friday, April 3, 2009, 1:12 PM

Hi Kenneth,

can you try the following : go to MatrixBase.h line 204:

    typedef typename ei_meta_if<int(Flags)&DirectAccessBit, const
Scalar&, Scalar>::ret CoeffReturnType;

the idea is that presumably MSVC makes the bitwise & return an
unsigned int, and then doesn't like the implicit cast to bool when
using that as the first template param to ei_meta_if<...>.

So you could try changing this line like this:

    typedef typename ei_meta_if<bool(int(Flags)&DirectAccessBit),
const Scalar&, Scalar>::ret CoeffReturnType;

If you get something that looks reasonable and fixes your issue, don't
hesitate to commit !


2009/4/3 Kenneth Riddile <kfriddile@xxxxxxxxx>:
> I just updated to the latest trunk after being out of the loop for awhile,
> and I'm getting warnings similar to everywhere
> I instantiate something like:
> typedef float Real;
> Eigen::Matrix<Real, 4, 4> matrix;

Mail converted by MHonArc 2.6.19+