Re: [eigen] nasty msvc compilation issue

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


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



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