Currently, the constructor of VectorXd requires Integer by the assertion of NumTraits<T>::IsInteger to specify the length. Will it be fine to releax to any type that convertible to int, such as a enumeration. The following code gets compilation error: static assertion failed: FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED. enum : int { Size = 2, }; VectorXd V(Size);
In the devel branch we already have internal::is_valid_index_type<T> for that purposes. It is used to detect singletons in operator(row_indices,col_indices), so we would just have to use that.
Fixed: https://bitbucket.org/eigen/eigen/commits/b31bfdc8cd3a/ and backported to 3.3. Thank you for reporting.
The unit test does not compile in C++03 mode (due to using anonymous enums, similar to Bug 1549). But since this was not possible before, we could just disable this test in that case.
yes, I've seen that this morning.
I think this is also due to that change: smallvectors fails in C++03 mode: http://manao.inria.fr/CDash/testSummary.php?project=1&name=smallvectors&date=2019-03-19 http://manao.inria.fr/CDash/testSummary.php?project=2&name=smallvectors&date=2019-03-19 Also in C++11 mode with gcc-4.8, but that might as well be an error in gcc.
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1692.