| [eigen] Static asserts in Eigen3 beta1/beta2 | 
[ Thread Index | 
Date Index
| More lists.tuxfamily.org/eigen Archives
] 
- To: eigen@xxxxxxxxxxxxxxxxxxx
 
- Subject: [eigen] Static asserts in Eigen3 beta1/beta2
 
- From: hauke strasdat <strasdat@xxxxxxxxx>
 
- Date: Fri, 19 Nov 2010 12:17:05 -0800
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=gamma;        h=domainkey-signature:received:mime-version:received:from:date         :message-id:subject:to:content-type;        bh=rPEymLk/oUDOnEocsT3cnOXgRnQWFIxa3OKBgN2f2Ig=;        b=p2iXLjkV/Aiwm4mZFaSba0RPsKbamqilyGwqhmk73nig2kMgZCWBRXSUmyZXThZ4WC         QXIB/J8AGC6O5JBmc3u4lRljAjO319gSVpFVbBdQGR9Hl1OlKd69+71NvyHGJnTAGwqQ         SpBUjiM4f0KhRatxCCK8nxi69aq8q5KSSuNnE=
 
- Domainkey-signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=gamma;        h=mime-version:from:date:message-id:subject:to:content-type;        b=FLHUKLantKdu0riNmxmEp9PMKF/TXdJ6X3cm2b3UyUyzGov/ZOPFxGqEs8291bc00b         mtYRT6SPJiZLujHLj8GVjQoNR6izSKCGPuhOK/Nx+m3RQyRGHCdMFtuJjB66Blcpk3b1         R0IpV2Ms2Dlyk0V3szLBmqgBmjz21RsEyBOYc=
 
Hi,
I fear this must be a known issue. However, I couldn't find any
information about it.
Let's look at the following minimal program.
---
#include <Eigen/Core>
void test_v5(const Eigen::Matrix<double,5,1> & v)
{
}
int main()
{
  Eigen::Matrix<double,6,1> v6;
  test_v5(v6);
}
---
Compiled against Eigen3 beta1, it leads to a compiler error/static
assert: YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES.
This is the desired behavior, right?
Compiling the same program against Eigen3 beta2, however, leads to no
compiler error! Only at run-time it triggers a assertion.
Is there any way to turn the static assertions back on in Eigen3 beta2?
I am using Ubuntu 10.04 Amd64, with gcc 4.4.
Thanks a lot,
Hauke