Andrey Semashev 7c9b4296a1 Fixed accessing members of the dereferenced value after iterator post-increment.
The recent commit 5777e9944b broke code such as
(*it++).foo(), where the result of dereferencing would be convertible to
the value type but did not provide the members of the value type. To mitigate
this, return a reference to the value instead of a proxy object. This will only
work for non-writable iterators (and it didn't work for writable iterators
before either) because in that case a proxy is needed to be able to intercept
operator=.

Also fix a similar issue with (it++)->foo() by adding operator-> overloads
to the post-increment result proxies.

Added tests for the fixes.
2022-11-18 00:46:21 +03:00
2022-01-13 17:32:11 +03:00
2021-06-10 00:56:31 +03:00
2021-09-15 22:15:48 +03:00

Boost.Iterator

Boost.Iterator, part of collection of the Boost C++ Libraries, provides tools for building and working with iterators in C++. The library also provides a number of iterator classes that can be used out of the box.

Directories

  • doc - Documentation sources
  • include - Interface headers of Boost.Iterator
  • test - Boost.Iterator unit tests
  • example - Boost.Iterator usage examples

More information

Build status

Branch GitHub Actions AppVeyor Test Matrix Dependencies
master GitHub Actions AppVeyor Tests Dependencies
develop GitHub Actions AppVeyor Tests Dependencies

License

Distributed under the Boost Software License, Version 1.0.

Description
Boost.org iterator module
Readme 14 MiB
Languages
C++ 99.5%
CMake 0.4%
HTML 0.1%