|
Boost : |
Subject: Re: [boost] [string_ref] string literal constructor
From: Nevin Liber (nevin_at_[hidden])
Date: 2013-11-07 17:27:52
On 7 November 2013 16:00, Gavin Lambert <gavinl_at_[hidden]> wrote:
>
> The first example in particular actually seems potentially dangerous to
> me, because the ability to handle the non-terminated string is "hidden",
> making it more likely that the author would forget and pass s to something
> else that's expecting a terminated string.
>
How does that differ from anything else that uses a C string?
I just don't see how string_ref is any worse.
-- Nevin ":-)" Liber <mailto:nevin_at_[hidden]> (847) 691-1404
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk