Re: [eigen] MSC compiler error: worth working around? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] MSC compiler error: worth working around?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 16 Apr 2010 07:21:45 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type :content-transfer-encoding; bh=kkrCpqlK+dVlZtzUKN1ytEPfs6ctWU5fQRmpoXIkUDo=; b=QI0MgyMVTJXa9rB7A9rWfU1+bFcXUZjjbBFm+uS7eC965eFsxIfUiES25APr0QfYcn IwwwXR61yY0ObhrP5bgO8qcq4eCQJrebgbb7vzCyX9nXG8poVZRc6JAMwpbgQMraKuJA DY0Ys5/ek7AgZrY1C4Pq9iudR5B2H+pcKPpK0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=GT/TdMfijk6Zq7Z4T/Nc1hEKBYGPpz+SGEhRojH5Fk6CoOiONPVha0y7FetT5lYIrz BZnJJvEKgoAWxgzWToyTujiu5h/qnPgomElU7WIE9er1asu3te11bH8kSzDXPhYFYwBl qzhYPRrfKnUdRA5v3WiWNPVGIEMEymfiFPjTM=
2010/4/16 Eamon Nerbonne <eamon.nerbonne@xxxxxxxxx>:
> Hi all,
> In the course of specializing some of my code to accept various eigen matrix
> types, I ran into an MSC bug.
There's 1 thing I dont understand: you're not the only one using MSC,
so why are you the first one to hit this problem? Hauke, do you know
about this?
> Essentially, eigen's classes have lots of
> members in the style of "using Base::SomeEnumMember;". Using those kind of
> "inherited" members as part of computations (not just unmodified usage) in
> template parameters in MSC triggers compiler bugs or an ICE (depending on
> the computation). I submitted a simple test-case & bug report to microsoft,
> but that's been closed [WontFix].
At least they didn't sue you for patent infringement (USPTO 29043801
"Method for triggering a bug in MSC with enums").
> One workaround would be to replace "using Base::SomeEnumMember;" with
> "enum{ SomeEnumMember = ei_traits<typename
> Base::Derived>::SomeEnumMember};".
Often, the stuff is only present in a Base class, not in ei_traits. So
it would be:
enum { SomeEnum = Base::SomeEnum };
> Leaving it out entirely works in MSC but
> not in GCC, unless I'm missing something.
Ah great! So on MSC we could replace using by just a comment opener "//" ?
Maybe the bug could be worked around by introducing a macro
EIGEN_IMPORT_ENUM(Enum, From)
> Alternatively, wouldn't it be
> possible to remove these helpers entirely and just always refer to ei_traits
> for these things?
Again, the enums aren't always present in the traits. See in MatrixBase.h.
Also, a "using" statement is probably simpler, since it doesn't define
anything new, so if we have the choice, it's probably better.
Benoit
> --eamon@xxxxxxxxxxxx - Tel#:+31-6-15142163
>