Re: [eigen] Value-initializing a Matrix |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
I dont get your code?: Do you mean this: struct foo { foo() : v{} private: Eigen::Vector2d v; }; or struct foo { foo() : v() private: Eigen::Vector2d v; }; I think Eigen should support value initialization ( although its tricky business and I am not quite sure about all the different initialization, “default”, “value”, “zero”) I think Eigen3 should (at least in the next release ) include the c++11 conformance with value initialization such that v{} get initialized properly (that means to zero) and any default-initialization should result in undetermined values . Anyway how can we distinguish in C++ between MatrixXd M; < default-initialization -> uninitialized MatrixXd M{}; < value-initialized -> zero initialized What would need to be done to distinguish these two cases? Am 19.04.2015 um 00:44 schrieb Matan Nassau <matan.nassau@xxxxxxxxx>: To be clear, my question stands still whether the code is |
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |