New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.Before reporting a bug, please make sure that your Eigen version is up-to-date!

As discussed on the thread: Eigen2 to Eigen3 Migration Path
To do:
* when EIGEN2_SUPPORT is defined, relax const correctness at least in Map constructors
* add back all Eigen2 features when EIGEN2_SUPPORT is defined
* if some Eigen2 feature has an unsolvable conflict with Eigen3, consider options. Could ignore if it's a very minor feature, or add a separate EIGEN2_FULL_SUPPORT_BREAK_EIGEN3 option.
* import the eigen2 test suite into the eigen3 test suite, though we could drop some variants of tests for lighter compilation.
* do not aim at ABI compatibility with Eigen2, that's a lost cause (different template parameter default values, different index types). Instead aim at API compatibility so people can just flip a flag and recompile.

I'm trying out the current head from hg to test building against repos.
I've found that the Eigen3 EIGEN2_SUPPORT version of USING_PART_OF_NAMESPACE_EIGEN is colliding with posix methods when used outside of a namespace as it is in projects like kdl.
{{{
cd /home/tfoote/geometry_trunk/geometry/kdl/build/kdl-tar/build/src && /usr/lib/ccache/c++ -Dorocos_kdl_EXPORTS -DEIGEN_USE_NEW_STDVECTOR -DEIGEN2_SUPPORT -O3 -DNDEBUG -fPIC -I/home/tfoote/geometry_trunk/geometry/eigen/include -I/home/tfoote/geometry_trunk/geometry/eigen/include -o CMakeFiles/orocos-kdl.dir/path_circle.cpp.o -c /home/tfoote/geometry_trunk/geometry/kdl/build/kdl-tar/src/path_circle.cpp
In file included from /home/tfoote/geometry_trunk/geometry/kdl/build/kdl-tar/src/treeiksolvervel_wdls.cpp:10:
/home/tfoote/geometry_trunk/geometry/kdl/build/kdl-tar/src/utilities/svd_eigen_HH.hpp:31: error: ‘random’ is already declared in this scope
}}}
replacing
using Eigen::internal::random;
with
namspace ei_random = Eigen::internal::random
lets me compile farther. I think this should be done for all the methods in this macro.

Done. operator[] on matrices is now allowed in EIGEN2_SUPPORT. Let me know how it compiles now!
Note that the proper Eigen3 port of this is trivial, just replace [] by (). This also works in Eigen2.
The meaning of matrix(index) is: the index-th coefficient in the matrix's native storage order.

Note

You need to
log in
before you can comment on or make changes to this bug.