mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-01 18:26:24 +08:00
Add DenseStorage specializations for dynamic size with MaxSize = 0 (bug #288).
This is necessary for instantiations like Matrix<float,Dynamic,Dynamic,0,0,0>.
This commit is contained in:
parent
16db255333
commit
0b308e79c4
@ -128,6 +128,16 @@ template<typename T, int _Rows, int _Cols, int _Options> class DenseStorage<T, 0
|
||||
inline T *data() { return 0; }
|
||||
};
|
||||
|
||||
// more specializations for null matrices; these are necessary to resolve ambiguities
|
||||
template<typename T, int _Options> class DenseStorage<T, 0, Dynamic, Dynamic, _Options>
|
||||
: public DenseStorage<T, 0, 0, 0, _Options> { };
|
||||
|
||||
template<typename T, int _Rows, int _Options> class DenseStorage<T, 0, _Rows, Dynamic, _Options>
|
||||
: public DenseStorage<T, 0, 0, 0, _Options> { };
|
||||
|
||||
template<typename T, int _Cols, int _Options> class DenseStorage<T, 0, Dynamic, _Cols, _Options>
|
||||
: public DenseStorage<T, 0, 0, 0, _Options> { };
|
||||
|
||||
// dynamic-size matrix with fixed-size storage
|
||||
template<typename T, int Size, int _Options> class DenseStorage<T, Size, Dynamic, Dynamic, _Options>
|
||||
{
|
||||
|
@ -62,8 +62,13 @@ void test_zerosized()
|
||||
zeroSizedMatrix<Matrix3i>();
|
||||
zeroSizedMatrix<Matrix<float, 2, Dynamic> >();
|
||||
zeroSizedMatrix<MatrixXf>();
|
||||
zeroSizedMatrix<Matrix<float, 0, 0> >();
|
||||
zeroSizedMatrix<Matrix<float, Dynamic, 0, 0, 0, 0> >();
|
||||
zeroSizedMatrix<Matrix<float, 0, Dynamic, 0, 0, 0> >();
|
||||
zeroSizedMatrix<Matrix<float, Dynamic, Dynamic, 0, 0, 0> >();
|
||||
|
||||
zeroSizedVector<Vector2d>();
|
||||
zeroSizedVector<Vector3i>();
|
||||
zeroSizedVector<VectorXf>();
|
||||
zeroSizedVector<Matrix<float, 0, 1> >();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user