Description: Support the new eigen3, in the same way this is done in gtsam 4.3
diff --git a/gtsam/base/Matrix.h b/gtsam/base/Matrix.h
index cfedf6d..7e50c16 100644
--- a/gtsam/base/Matrix.h
+++ b/gtsam/base/Matrix.h
@@ -52,9 +52,7 @@ using Matrix5##N = Eigen::Matrix<double, 5, N>;  \
 using Matrix6##N = Eigen::Matrix<double, 6, N>;  \
 using Matrix7##N = Eigen::Matrix<double, 7, N>;  \
 using Matrix8##N = Eigen::Matrix<double, 8, N>;  \
-using Matrix9##N = Eigen::Matrix<double, 9, N>;  \
-static const Eigen::MatrixBase<Matrix##N>::IdentityReturnType I_##N##x##N = Matrix##N::Identity(); \
-static const Eigen::MatrixBase<Matrix##N>::ConstantReturnType Z_##N##x##N = Matrix##N::Zero();
+using Matrix9##N = Eigen::Matrix<double, 9, N>;
 
 GTSAM_MAKE_MATRIX_DEFS(1)
 GTSAM_MAKE_MATRIX_DEFS(2)
@@ -66,6 +64,35 @@ GTSAM_MAKE_MATRIX_DEFS(7)
 GTSAM_MAKE_MATRIX_DEFS(8)
 GTSAM_MAKE_MATRIX_DEFS(9)
 
+#define I_1x1 Matrix1::Identity()
+#define Z_1x1 Matrix1::Constant(0.0)
+
+#define I_2x2 Matrix2::Identity()
+#define Z_2x2 Matrix2::Constant(0.0)
+
+#define I_3x3 Matrix3::Identity()
+#define Z_3x3 Matrix3::Constant(0.0)
+
+#define I_4x4 Matrix4::Identity()
+#define Z_4x4 Matrix4::Constant(0.0)
+
+#define I_5x5 Matrix5::Identity()
+#define Z_5x5 Matrix5::Constant(0.0)
+
+#define I_6x6 Matrix6::Identity()
+#define Z_6x6 Matrix6::Constant(0.0)
+
+#define I_7x7 Matrix7::Identity()
+#define Z_7x7 Matrix7::Constant(0.0)
+
+#define I_8x8 Matrix8::Identity()
+#define Z_8x8 Matrix8::Constant(0.0)
+
+#define I_9x9 Matrix9::Identity()
+#define Z_9x9 Matrix9::Constant(0.0)
+
+
+
 // Matrix expressions for accessing parts of matrices
 typedef Eigen::Block<Matrix> SubMatrix;
 typedef Eigen::Block<const Matrix> ConstSubMatrix;
diff --git a/gtsam/base/Vector.h b/gtsam/base/Vector.h
index f7923ff..b734709 100644
--- a/gtsam/base/Vector.h
+++ b/gtsam/base/Vector.h
@@ -27,6 +27,7 @@
 
 #include <gtsam/global_includes.h>
 #include <Eigen/Core>
+#include <cassert>
 #include <iosfwd>
 #include <list>
 
@@ -42,14 +43,23 @@ typedef Eigen::Matrix<double, 1, 1> Vector1;
 typedef Eigen::Vector2d Vector2;
 typedef Eigen::Vector3d Vector3;
 
-static const Eigen::MatrixBase<Vector2>::ConstantReturnType Z_2x1 = Vector2::Zero();
-static const Eigen::MatrixBase<Vector3>::ConstantReturnType Z_3x1 = Vector3::Zero();
+#define Z_2x1 Vector2::Constant(0.0)
+#define Z_3x1 Vector3::Constant(0.0)
+#define Z_4x1 Vector4::Constant(0.0)
+#define Z_5x1 Vector5::Constant(0.0)
+#define Z_6x1 Vector6::Constant(0.0)
+#define Z_7x1 Vector7::Constant(0.0)
+#define Z_8x1 Vector8::Constant(0.0)
+#define Z_9x1 Vector9::Constant(0.0)
+#define Z_10x1 Vector10::Constant(0.0)
+#define Z_11x1 Vector11::Constant(0.0)
+#define Z_12x1 Vector12::Constant(0.0)
+#define Z_15x1 Vector15::Constant(0.0)
 
 // Create handy typedefs and constants for vectors with N>3
 // VectorN and Z_Nx1, for N=1..9
 #define GTSAM_MAKE_VECTOR_DEFS(N)                \
-  using Vector##N = Eigen::Matrix<double, N, 1>; \
-  static const Eigen::MatrixBase<Vector##N>::ConstantReturnType Z_##N##x1 = Vector##N::Zero();
+  using Vector##N = Eigen::Matrix<double, N, 1>;
 
 GTSAM_MAKE_VECTOR_DEFS(4)
 GTSAM_MAKE_VECTOR_DEFS(5)
