On Sun, Aug 11, 2019 at 10:52 AM Peter Dimov via Boost < boost@lists.boost.org> wrote:
Zach Laine wrote:
On Sun, Aug 11, 2019 at 5:43 AM Peter Dimov via Boost
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. Zach