Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept iterators with a non-void value_type #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fsimonis
Copy link

@fsimonis fsimonis commented Jul 8, 2019

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.

This is compatible with the iterator rules up to C++20.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant