Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ryanhaining/cppitertools
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
Loading
...
head repository: thomas001/cppitertools
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 24 files changed
  • 1 contributor

Commits on Feb 25, 2023

  1. Make operator* and operator-> const in all iterators.

    C++ iterators basically model pointers. Hence a const pointer can still
    be dereferenced to a mutable object (`T * const` *not* `const T*`). This
    is not true for many iterators in itertools since they only have
    non-`const` versions of `operator*`. This also violates C++ iterator
    concepts, see [the github issue](#91).
    
    This change basically replaces all non-`const` dereference operators
    with `const` ones. This was straight forward in most cases:
    
    - Some iterators own the data they return (note: that probably violates
      [`LegacyForwardIterator`](https://en.cppreference.com/w/cpp/named_req/ForwardIterator)).
      So those data fields were changed to `mutable`.
    - `GroupBy` advances the group while dereferencing. This does not work
      when the iterator is constant. Moved the advancing to the constructor
      and increment operators. This is the only real behavior change, please
      review carefully.
    Thomas Weidner committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    568db64 View commit details
    Browse the repository at this point in the history
  2. Allow ArrowHelper to work with all pointer types.

    Just specializing on `T*` misses cv-qualified pointer types like `int
    *const`. This change uses `std::is_pointer_v` instead to determine
    whether a type is a pointer.
    Thomas Weidner committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    15c96e1 View commit details
    Browse the repository at this point in the history
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.