Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-08-11 15:52:12


Zach Laine wrote:
> On Sun, Aug 11, 2019 at 5:43 AM Peter Dimov via Boost
> <boost_at_[hidden]> wrote:
>
> > Zach Laine wrote:
> >
> > > https://tzlaine.github.io/iterator_facade
> >
> > `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. :-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk