Re: [eigen] can't reproduce gcc 4.3.4 errors

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


On Tue, Jun 29, 2010 at 2:53 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> But can you try this: replace this line:
>
>>    EIGEN_STRONG_INLINE X(const X&) {}
>
> by
>
> EIGEN_STRONG_INLINE X(const X&)
> {
>    *reinterpret_cast<char*>(this) = *reinterpret_cast<const char*>(&X);
> }
>
> this assumes that sizeof(X)==1, of course.

same issue.

But doing:

EIGEN_STRONG_INLINE X(const X& ) { std::cerr << sizeof(X) << "\n"; }

solves (hides) it... and yes sizeof(X) == 1

gael



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