Re: [eigen] nasty msvc compilation issue |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] nasty msvc compilation issue
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Mon, 1 Mar 2010 19:55:45 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=56pZwjmCEso3VbCoqh+vxdjIcmO9GgA2MgdoPSaWWcg=; b=qWj21rATskAUI9chHJHnnC/xDmpnHW1/fYLUy2AQSJOH1vTXk6CkcTZuZUIEjXqqUP yOKq/dBGlefTieS1edp4Lsep5GgZRb1yjN8GyyC5QrLgH1jGBdMcZTJw8i363AsWcf89 +DKAT8qKj5aiSV66/c7Ze8I10H7s85nPDKT/Q=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=IZd21alqu5dEqmDiA34Ol88QOvNEew6/udA+iKJ1ix3qydobO+JJ+q+080YTQgc55c uEZkfAdTbSqLhmYXW2UBlBY45cfC7jlq2koCZdPUNqL3tztAAoc2GziK7sOWJqm+UO+Z vyn1rUKeS8lJOM0smf8dN+wJu8pkN8xALdc0Y=
Fixed! MSVC does not like brackets when defining default parameters
for templates. I needed to change
template<typename MatrixType, int BlockRows=Dynamic, int BlockCols=Dynamic,
int _DirectAccessStatus =
(ei_traits<MatrixType>::Flags&DirectAccessBit) ? HasDirectAccess :
NoDirectAccess> class Block;
to
template<typename MatrixType, int BlockRows=Dynamic, int BlockCols=Dynamic,
int _DirectAccessStatus =
ei_traits<MatrixType>::Flags&DirectAccessBit ? HasDirectAccess :
NoDirectAccess> class Block;
I tried to circumvent this with a ei_meta_int_if (like ei_meta_if but
with enums) but that does not work either! I hope we don't break any
other compiler, otherwise this forward declaration needs to be put in
its own MSVC guarded path.
- Hauke