Re: [eigen] can't reproduce gcc 4.3.4 errors |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] can't reproduce gcc 4.3.4 errors
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 29 Jun 2010 15:38:20 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=B2uEORZ990HfQD7eHqYt5C9ZEvfqqpCWjJyI1aIBgvk=; b=IdYmkiPafd5hQqM4qodHRXlEpu2+oYHSUX4zVIxvwvW/xi0uzRbiiJRGyH6gYGKa2E Cn5hy3IjxQPNOUX1aQvjuZMziDRpruna/vy++3yz+GyafM33cPCq2u7iOMMzHrOZstcV 1oP7BZw4AWE233WVijFby4i1wZeV/Cwa6Rfcw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=GrR+9ZhQaXa8FC+as+cPZnBjTAnQDuwUiOf5TEWQrAugQTZMgxlCcNIEyGh+W0/+l9 wew3FBQl2M43WEontz9mIndOl/nhe/rUXTr1Kevo4n1AlVW9+ZIRLhRJWoeY3mrDAniA RgkGFNF7PystsebHxMKqaj8ZIcpeRrqQx+WyE=
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