Interest in updated, standalone iterator_facade library?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Interest in updated, standalone iterator_facade library?

Boost - Users mailing list
I write a lot of iterators, and I'm getting sick of doing it by hand.  I can't use Boost.Iterator's iterator_facade in library code, since it knows nothing about constexpr and noexcept.

The design of Boost.Iterator's iterator_facade does not lend itself very well to being modified in a direction that is standardization-friendly (reasons why are outlined in the online docs).

So, here is one take on this problem:

GitHub:

Online Docs:

For those unfamiliar with the problem, iterators are very simple, at the highest level of abstraction.  An iterator's implementation does not reflect this -- it is highly repetitive and easy to get subtly wrong.  This library fixes that.

The library is forward-looking, since I intend to write WG21 papers to standardize iterator_facade; there is good support for upcoming C++20 library features.  In particular, the iterators created with iterator_facade model the C++20 iterator concepts, and therefore do not necessarily match the requirements of the C++17-and-earlier requirement tables.  I have not found this to affect the usability of iterator-facade-based iterators with pre-C++20 code.

Something to note: there was a recent-ish attempt to stanrdize iterator_facade, which is now abandoned, P0186 (http://wg21.link/P0186).  This was very different from what I'm proposing for Boost.  I talked to Eric Niebler about this, and he favors a return to the CRTP-based approach of my lib and the original Boost.Iterator iterator_facade library.

Zach



_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Interest in updated, standalone iterator_facade library?

Boost - Users mailing list
Hello

I am using boost iterator_facade currently and an updated version would be welcome.

I couldn't tell from your documentation what are the compiler requirements of your library. Is it C++14 or C++17 compatible? Does it need C++20?

Le dim. 11 août 2019 à 04:21, Zach Laine via Boost-users <[hidden email]> a écrit :
I write a lot of iterators, and I'm getting sick of doing it by hand.  I can't use Boost.Iterator's iterator_facade in library code, since it knows nothing about constexpr and noexcept.

The design of Boost.Iterator's iterator_facade does not lend itself very well to being modified in a direction that is standardization-friendly (reasons why are outlined in the online docs).

So, here is one take on this problem:

GitHub:

Online Docs:

For those unfamiliar with the problem, iterators are very simple, at the highest level of abstraction.  An iterator's implementation does not reflect this -- it is highly repetitive and easy to get subtly wrong.  This library fixes that.

The library is forward-looking, since I intend to write WG21 papers to standardize iterator_facade; there is good support for upcoming C++20 library features.  In particular, the iterators created with iterator_facade model the C++20 iterator concepts, and therefore do not necessarily match the requirements of the C++17-and-earlier requirement tables.  I have not found this to affect the usability of iterator-facade-based iterators with pre-C++20 code.

Something to note: there was a recent-ish attempt to stanrdize iterator_facade, which is now abandoned, P0186 (http://wg21.link/P0186).  This was very different from what I'm proposing for Boost.  I talked to Eric Niebler about this, and he favors a return to the CRTP-based approach of my lib and the original Boost.Iterator iterator_facade library.

Zach


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users