mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-09 22:39:05 +08:00
attempt to fix #101
This commit is contained in:
parent
2a82b162d7
commit
3e08c22028
@ -41,10 +41,19 @@ template<typename ExpressionType> class NestByValue;
|
||||
template<typename ExpressionType> class ForceAlignedAccess;
|
||||
template<typename ExpressionType> class SwapWrapper;
|
||||
template<typename MatrixType> class Minor;
|
||||
// MSVC will not compile when the expression ei_traits<MatrixType>::Flags&DirectAccessBit
|
||||
// is put into brackets like (ei_traits<MatrixType>::Flags&DirectAccessBit)!
|
||||
|
||||
// MSVC has a big bug: when the expression ei_traits<MatrixType>::Flags&DirectAccessBit ? HasDirectAccess : NoDirectAccess
|
||||
// is used as default template parameter value here, it gets mis-evaluated as just ei_traits<MatrixType>::Flags
|
||||
// Moreover, adding brackets tends to give compilation errors with MSVC.
|
||||
// Solution: defer that to a helper struct.
|
||||
template<typename MatrixType>
|
||||
struct ei_block_direct_access_status
|
||||
{
|
||||
enum { ret = ei_traits<MatrixType>::Flags&DirectAccessBit ? HasDirectAccess : NoDirectAccess };
|
||||
};
|
||||
template<typename MatrixType, int BlockRows=Dynamic, int BlockCols=Dynamic,
|
||||
int _DirectAccessStatus = ei_traits<MatrixType>::Flags&DirectAccessBit ? HasDirectAccess : NoDirectAccess> class Block;
|
||||
int _DirectAccessStatus = ei_block_direct_access_status<MatrixType>::ret> class Block;
|
||||
|
||||
template<typename MatrixType, int Size=Dynamic> class VectorBlock;
|
||||
template<typename MatrixType> class Transpose;
|
||||
template<typename MatrixType> class Conjugate;
|
||||
|
Loading…
x
Reference in New Issue
Block a user