cxx-prettyprint icon indicating copy to clipboard operation
cxx-prettyprint copied to clipboard

Accept iterators with a non-void value_type

Open fsimonis opened this issue 5 years ago • 0 comments

This PR changes has_const_iterator to additionally check

  1. for std::iterator_traits to exist and
  2. for its return_type to be non-void.

This catches additional cases and is compatible with the iterator rules up to C++20.

Motivation for this change is the incompatibility with the new iterator interface of Eigen3, which sets const_iterator = void for non-vector types. This breaks prettyprint.

fsimonis avatar Jul 08 '19 10:07 fsimonis