Boost logo

Boost :

From: Alan de Freitas (alandefreitas_at_[hidden])
Date: 2022-08-15 20:59:16


>
> std::list is not an iterator, applying std::iterator_traits to it is not
> valid (for one, std::list does not have an iterator_category).
>

Oh... Right. I failed to notice Source is (i) a basic_string, (ii)
basic_string_view, or (iii) an iterator with one of those value types.
We assumed Source would be (i) a basic_string, (ii) basic_string_view, or
(iii) a container with one of those value types.
Great.

> If the user calls a function passing two iterators, he is arguably aware
> that he is constructing/assigning/appending elements one-by-one,
> performing element-wise conversion, if needed. Again, this is
> established practice.
>

Yes. That makes sense.

> In comparison, the two-iterator signature is rather explicit and clear
> wherever you see it.
>

Definitely.

Thank you again for clarifying.

-- 
Alan Freitas
https://github.com/alandefreitas

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