As an example: using Op = Eigen::VectorwiseOp<Eigen::Array<int, -1, -1, 0, -1, -1>, 0>; using T = Op::const_iterator; // subvector_stl_iterator<const ...> using U = decltype(std::declval<const Op&>().cbegin()); // subvector_stl_iterator<const ...> using V = decltype(std::cbegin(std::declval<const Op&>())); // subvector_stl_iterator<...> V should be the same as T, but isn't.
I guess we can just replace iterator begin() const; in VectorwiseOp.h by a const and non-const method (where only the non-const method returns a non-const iterator). I need to test if that breaks anything, though.
Yeah, that should fix it. Let me know if there’s anything I can do.
Thank you for the report. Fixed: https://bitbucket.org/eigen/eigen/commits/5f0ff9f34ddd/
-- 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/1774.