Boost logo

Boost :

From: Hans Dembinski (hans.dembinski_at_[hidden])
Date: 2019-08-12 08:26:22

Dear Zach,

Dear Zach,

> On 11. Aug 2019, at 18:00, Zach Laine via Boost <boost_at_[hidden]> wrote:
> On Sun, Aug 11, 2019 at 10:52 AM Peter Dimov via Boost <
> boost_at_[hidden]> wrote:
>> Zach Laine wrote:
>>> On Sun, Aug 11, 2019 at 5:43 AM Peter Dimov via Boost
>>> <boost_at_[hidden]> wrote:
>>>> Zach Laine wrote:
>>>> `reference` being `char const` in the introductory example doesn't
>> feel
>>>> correct. `char const` can't be returned from a function (such as
>>>> `operator*`), top-level qualifiers aren't meaningful for `char`.
>>> It is correct, as of C++20. Proxy iterators are first-class citizens,
>> as
>>> of the ranges concepts work. I used that reference type on purpose, and
>> I
>>> refer to that later in the docs. Also, this is copy-paste from
>> Boost.Text
>>> (proposed), which uses that exact iterator with a "char const" reference
>>> type.
>> Thanks. You should however be aware that both gcc and clang warn on
>> functions returning `const char` with -Wextra. :-)
> Huh. Good to know. I guess I should change it to char then.

+1 for the proposal to have a modern iterator_fascade. I use a private implementation of iterator_fascade in Boost.Histogram for a couple of reasons, but mostly because the old boost iterator library pulls in a lot of boost dependencies which I want to avoid. But code duplication is bad, so I am looking forward to switch to your library which only depends on the stdlib.

I object to change the name of iterator_fascade. The established convention in Boost is to call a updated library X with the same purpose X2, see variant and variant2, coroutine and coroutine2, signal and signal2, etc. This library should follow this route and be called iterator2.

I am by no means an expert of the iterator_fascade, but I spend some time to figure out how the old iterator_fascade works, and it has some subtle solutions to corner case situations. Therefore, I would recommended that you port the iterator test suite to your project (if you haven't done so already).

Also, please add a modern iterator_adaptor. iterator_adaptors are awesome, because you need to implemented even less.

Best regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at