|
Boost : |
From: Ahmed Charles (me+boost_at_[hidden])
Date: 2021-10-20 22:15:22
On Friday, October 15th, 2021 at 5:14 AM, Phil Endecott via Boost <boost_at_[hidden]> wrote:
>
> Exactly, it's like returning a string_view from a function - which
> you should never do, at least not without an obvious indication...
My primary objection to this line of thinking is that the standard begin/end functions have the same dangerous implications as this function does. The input can be a string and the output is something that becomes invalid when that string is destroyed.
C++ doesn't have a good solution to this situation and clearly begin/end don't give an obvious indication.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk