Re: [eigen] patches for EIGEN_STATIC_ASSERT

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


That sounds good to me.


--- On Thu, 12/18/08, Keir Mierle <mierle@xxxxxxxxx> wrote:

> From: Keir Mierle <mierle@xxxxxxxxx>
> Subject: Re: [eigen] patches for EIGEN_STATIC_ASSERT
> To: eigen@xxxxxxxxxxxxxxxxxxx
> Date: Thursday, December 18, 2008, 11:59 AM
> Just to toss in a random comment:
> 
> On Wed, Dec 17, 2008 at 7:57 PM, Benoit Jacob
> <jacob.benoit.1@xxxxxxxxx>wrote:
> 
> > Thanks for your patches. In principle I like them, buy
> my GCC 4.3
> > doesn't seem to (see below)... which shows that
> these things are
> > immensely compiler-dependent and that it's going
> to be difficult to
> > find a good solution for everyone.
> >
> > So I make this counter-proposal to you: how about
> simply turning off
> > the MSVC warning with a #pragma ?
> >
> > In order to test the effect of your patches with GCC,
> I tried this program:
> >
> > #include <Eigen/Core>
> > int main() {
> >  Eigen::Matrix4d m;
> >  Eigen::Matrix2d n;
> >  std::cout << (m + n) << std::endl;
> > }
> >
> > First of all I had to add a static assert in
> CwiseBinaryOp.h to guard
> > that as somehow we had forgotten to. So, please
> 'svn up' before if you
> > want to try.
> >
> > With the current Eigen, the whole compiler output I
> get (gcc 4.3) is:
> >
> > === BEGIN GCC OUTPUT =================================
> >
> >
> cuisine/trunk/kdesupport/eigen2/Eigen/src/Core/CwiseBinaryOp.h:
> In
> > constructor 'Eigen::CwiseBinaryOp<BinaryOp,
> Lhs,
> > Rhs>::CwiseBinaryOp(const Lhs&, const Rhs&,
> const BinaryOp&) [with
> > BinaryOp = Eigen::ei_scalar_sum_op<double>, Lhs
> =
> > Eigen::Matrix<double, 4, 4, 0, 4, 4>, Rhs =
> Eigen::Matrix<double, 2,
> > 2, 0, 2, 2>]':
> >
> cuisine/trunk/kdesupport/eigen2/Eigen/src/Core/CwiseBinaryOp.h:181:
> > instantiated from 'const
> >
> Eigen::CwiseBinaryOp<Eigen::ei_scalar_sum_op<typename
> > Eigen::ei_traits<T>::Scalar>, Derived,
> OtherDerived>
> > Eigen::MatrixBase<Derived>::operator+(const
> > Eigen::MatrixBase<OtherDerived>&) const
> [with OtherDerived =
> > Eigen::Matrix<double, 2, 2, 0, 2, 2>, Derived =
> Eigen::Matrix<double,
> > 4, 4, 0, 4, 4>]'
> > xdfk.cpp:5:   instantiated from here
> >
> cuisine/trunk/kdesupport/eigen2/Eigen/src/Core/CwiseBinaryOp.h:105:
> > error: 'you_mixed_matrices_of_different_sizes'
> is not a member of
> > 'Eigen::ei_static_assert<false>'
> >
> > === END GCC OUTPUT =================================
> 
> 
> An aside.
> 
> This is great output; it makes working with eigen very nice
> compared to some
> other tmp libraries. My only suggestion is to make the
> errors all caps so
> that it REALLY_STANDS_OUT_AT_YOU AMONG_THE_COMPILER_OUTPUT.
> 
> Keir

---


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