mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-09 07:00:27 +08:00
MSVC runs into problems when a forward declaration is using a different template type name than the actual declaration.
This fixes the recent issues we observed on MSVC systems.
This commit is contained in:
parent
28dde19e40
commit
27a4a748cb
@ -54,13 +54,13 @@ template<typename MatrixType> class Minor;
|
|||||||
// is used as default template parameter value here, it gets mis-evaluated as just ei_traits<MatrixType>::Flags
|
// 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.
|
// Moreover, adding brackets tends to give compilation errors with MSVC.
|
||||||
// Solution: defer that to a helper struct.
|
// Solution: defer that to a helper struct.
|
||||||
template<typename MatrixType>
|
template<typename XprType>
|
||||||
struct ei_block_direct_access_status
|
struct ei_block_direct_access_status
|
||||||
{
|
{
|
||||||
enum { ret = ei_traits<MatrixType>::Flags&DirectAccessBit ? HasDirectAccess : NoDirectAccess };
|
enum { ret = ei_traits<XprType>::Flags&DirectAccessBit ? HasDirectAccess : NoDirectAccess };
|
||||||
};
|
};
|
||||||
template<typename MatrixType, int BlockRows=Dynamic, int BlockCols=Dynamic,
|
template<typename XprType, int BlockRows=Dynamic, int BlockCols=Dynamic,
|
||||||
int _DirectAccessStatus = ei_block_direct_access_status<MatrixType>::ret> class Block;
|
int _DirectAccessStatus = ei_block_direct_access_status<XprType>::ret> class Block;
|
||||||
|
|
||||||
template<typename MatrixType, int Size=Dynamic> class VectorBlock;
|
template<typename MatrixType, int Size=Dynamic> class VectorBlock;
|
||||||
template<typename MatrixType> class Transpose;
|
template<typename MatrixType> class Transpose;
|
||||||
|
Loading…
Reference in New Issue
Block a user