cxx-prettyprint
cxx-prettyprint copied to clipboard
Accept iterators with a non-void value_type
This PR changes has_const_iterator
to additionally check
- for
std::iterator_traits
to exist and - 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
.